Difference between revisions of "OS4X with nginx"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
location ~ /os4xapi/index\.php.* { | location ~ /os4xapi/index\.php.* { | ||
include fastcgi_params; | include fastcgi_params; | ||
− | fastcgi_pass unix:/var/run/ | + | fastcgi_pass unix:/var/run/php7.2-fpm.sock; |
fastcgi_index index.php; | fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root/os4x/os4xapi/index.php; | fastcgi_param SCRIPT_FILENAME $document_root/os4x/os4xapi/index.php; | ||
Line 20: | Line 20: | ||
location ~ index\.php.* { | location ~ index\.php.* { | ||
include fastcgi_params; | include fastcgi_params; | ||
− | fastcgi_pass unix:/var/run/ | + | fastcgi_pass unix:/var/run/php7.2-fpm.sock; |
} | } | ||
} | } | ||
</pre> | </pre> |
Revision as of 18:40, 26 January 2019
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 { root /var/www/html; index index.php index.html; location ~ /os4xapi/index\.php.* { include fastcgi_params; fastcgi_pass unix:/var/run/php7.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/os4x/os4xapi/index.php; } location ~ index\.php.* { include fastcgi_params; fastcgi_pass unix:/var/run/php7.2-fpm.sock; } }