diff --git a/conf/nginx.conf b/conf/nginx.conf index ca4834f..fd1404c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,14 +11,15 @@ location __PATH__/ { try_files $uri @__NAME__; - location ~ ^__PATH__/index\.php(/|$) { - include fastcgi_params; - fastcgi_split_path_info ^(.+\.php)(/.*)$; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param REMOTE_USER $remote_user; + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_intercept_errors on; + + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; } # return 404 for all other php files not matching the front controller