IT Knowledge Base

Technical Repository

HowTo: Update Nginx Configuration to support PHP files

These are the default settings for Nginx. OpenĀ /usr/local/nginx/conf/nginx.conf to edit. nano /usr/local/nginx/conf/nginx.conf location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } Update the nginx.conf file to these settings location ~ \.php$ { root /var/www; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } In order to use […]

Read More


HowTo: Enable the Status page for NGINX

Nginx has status page to give you information about Nginx’s server health including Active connections and other data. These statistics applied to the entire Nginx server and not per virtual host. nginx -V | grep –color -o http_stub_status Open Nginx.conf file to enable the status page. nano /usr/local/nginx/conf/nginx.conf Update the server { } block with […]

Read More