OS4X with nginx

From OS4X
Revision as of 10:24, 6 November 2020 by Admin (talk | contribs) (→‎Nginx configuration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PHP installation

PHP must be installed as "FastCGI Process Manager" process:

apt-get install php-fpm

Nginx configuration

In order to make the OS4X web interface(s) work with nginx, you have to configure the server correctly. Such a configuration for the administrative web interface can be:

server {
    listen 80;
    root /var/www/html;

    index index.html index.htm index.php;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php.* {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     }

    location ~ /\.ht {
        deny all;
    }
}