When should I use this fastcgi-php.conf?
Use it to restore a missing default, confirm what shipped, or diff against your current NGINX config.
# 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;
curl https://exampleconfig.com/api/v1/config/original/828e5bd1f3de7b3ef0e6856598b2a8c0?hint=fastcgi-php.conf
wget -O fastcgi-php.conf https://exampleconfig.com/api/v1/config/original/828e5bd1f3de7b3ef0e6856598b2a8c0?hint=fastcgi-php.conf
<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/828e5bd1f3de7b3ef0e6856598b2a8c0?hint=fastcgi-php.conf' /><config><app>NGINX</app><os>Debian 13 (Trixie)</os><location>/etc/nginx/snippets/fastcgi-php.conf</location><lines>13</lines><md5>828e5bd1f3de7b3ef0e6856598b2a8c0</md5><sha256>a9dd98bf9631d727f0a846a9c7f4fe6193468a714c782df26d5cc9a7756411f2</sha256></config></prompt>
Paste into Claude, ChatGPT, or any AI assistant.
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 it to restore a missing default, confirm what shipped, or diff against your current NGINX config.
How do I restore NGINX defaults?
Download the file, back up the current one in /etc/nginx/snippets/fastcgi-php.conf, replace it, then reload or restart NGINX.
Is fastcgi-php.conf safe for production?
It is the vendor default for Debian 13 (Trixie). Treat it as a baseline and review security and performance settings before production use.
How does this differ from other OS versions?
Defaults vary by distro and version. This copy matches Debian 13 (Trixie).
Can I use this for NGINX troubleshooting?
Yes. Diff it against yours to find drift, then restore only the sections you need.