When should I use this fastcgi-php.conf?
Use this file to restore NGINX defaults after misconfiguration, for fresh installations, or as a customization baseline.
curl https://exampleconfig.com/api/v1/config/original/678c2236edfebe41de06c26fb378e9a0?hint=fastcgi-php.conf
wget -O fastcgi-php.conf https://exampleconfig.com/api/v1/config/original/678c2236edfebe41de06c26fb378e9a0?hint=fastcgi-php.conf
# regex to split $uri to $fastcgi_script_name and $fastcgi_path fastcgi_split_path_info ^(.+\.php)(/.+)$; # Check that the PHP script exists before passing it try_files $fastcgi_script_name =404; # Bypass the fact that try_files resets $fastcgi_path_info # see: http://trac.nginx.org/nginx/ticket/321 set $path_info $fastcgi_path_info; fastcgi_param PATH_INFO $path_info; fastcgi_index index.php; include fastcgi.conf;
sudo apk add nginx
sudo apt update && sudo apt install nginx
sudo yum install nginx
sudo apt update && sudo apt install nginx
When should I use this fastcgi-php.conf?
Use this file to restore NGINX defaults after misconfiguration, for fresh installations, or as a customization baseline.
How do I restore NGINX defaults?
Download this file, backup your current config, then replace /etc/nginx/snippets/fastcgi-php.conf. Restart NGINX service.
Is fastcgi-php.conf safe for production?
Factory default from NGINX on Debian 9 (Stretch). Safe baseline, but customize for your requirements.
How does this differ from other OS versions?
This config is from Debian 9 (Stretch). Other OS versions may have different defaults. Check compatibility section.
Can I use this for NGINX troubleshooting?
Yes, compare this original config with your current settings to identify problematic modifications.