# FastCGI # these two lines #include fastcgi_params; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # can also be replaced by #include snippets/fastcgi-php.conf # if it exists # CGI location ~ /cgi-bin/.+\.cgi$ { if (!-f $request_filename) { return 404; } include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTPS $https; fastcgi_pass unix:/var/run/fcgiwrap.socket; } # PHP location ~ \.php$ { if (!-f $request_filename) { return 404; } include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTPS $https; fastcgi_pass unix:/var/run/php/php-fpm.sock; }