nginx: only index.php needs to be sent to PHP-FPM
This commit is contained in:
parent
2e37d044ae
commit
c672af5434
|
@ -7,17 +7,15 @@ location __PATH__/ {
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
# Chrooted PHP-FPM
|
# Chrooted PHP-FPM
|
||||||
#sub_path_only location ~ ^__PATH__(?<chroot_path>/.*\.php)$ {
|
location __PATH__/index.php {
|
||||||
#root_path_only location ~ ^(?<chroot_path>/.*\.php)$ {
|
|
||||||
alias /;
|
alias /;
|
||||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param SCRIPT_FILENAME $chroot_path;
|
fastcgi_param SCRIPT_FILENAME /index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
#sub_path_only }
|
}
|
||||||
#root_path_only }
|
|
||||||
|
|
||||||
# Security related headers
|
# Security related headers
|
||||||
more_set_headers "Referrer-Policy: no-referrer";
|
more_set_headers "Referrer-Policy: no-referrer";
|
||||||
|
|
Loading…
Reference in New Issue