andybeak
9/28/2016 - 2:06 PM

For book - nginx configuration to show php version setup

For book - nginx configuration to show php version setup

# This is a minimal example used to demonstrate swapping PHP versions
# It is not production ready and omits basic security checks.
server {
    listen 80;
    listen [::]:80;
    root /usr/share/nginx/html;

    location ~ \.php$ {
      fastcgi_param           SCRIPT_FILENAME $document_root$fastcgi_script_name;
    	fastcgi_index index.php;
    	include fastcgi_params;
        # With php5-fpm:
        fastcgi_pass unix:/run/php/php5.6-fpm.sock;
    }
}