From 18fc6eb704a16cf91a23f1ad6b534f695f6e2ead Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Fri, 12 Dec 2025 06:02:01 +0000 Subject: [PATCH] feat: fastcgi-php.conf disable try_files --- snippets/fastcgi-php.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 snippets/fastcgi-php.conf diff --git a/snippets/fastcgi-php.conf b/snippets/fastcgi-php.conf new file mode 100644 index 0000000..6c17d4d --- /dev/null +++ b/snippets/fastcgi-php.conf @@ -0,0 +1,13 @@ +# 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;