# # Pass requests for PHP scripts to PHP FPM # # Use index.php as default for '/' requests index index.php index.html index.htm; # Catch PHP scripts location ~ [^/]\.php(/|$) { # Split requests in script-file and trailing path fastcgi_split_path_info ^(.+?\.php)(/.*)$; # Check for existence of script-file before sending to backend if (!-f $document_root$fastcgi_script_name) { return 404; } # Pass the request to PHP FPM via FastCGI backend fastcgi_pass php-backend; # Script filename tp append if URI ends with a slash fastcgi_index index.php; # Environment variables to send to the FastCGI backend include fastcgi_params; }