From c672af543453c32276d66047be83d4f8dc806906 Mon Sep 17 00:00:00 2001 From: Miraty Date: Sun, 9 Jul 2023 03:40:09 +0200 Subject: [PATCH] nginx: only index.php needs to be sent to PHP-FPM --- conf/nginx.conf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2f4b123..2d73f1b 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,17 +7,15 @@ location __PATH__/ { index index.php; # Chrooted PHP-FPM -#sub_path_only location ~ ^__PATH__(?/.*\.php)$ { -#root_path_only location ~ ^(?/.*\.php)$ { + location __PATH__/index.php { alias /; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $chroot_path; + fastcgi_param SCRIPT_FILENAME /index.php; include fastcgi_params; -#sub_path_only } -#root_path_only } + } # Security related headers more_set_headers "Referrer-Policy: no-referrer";