Move root out of location context #5

Merged
MarcHagen merged 1 commits from patch-1 into main 2022-07-29 22:17:07 +08:00

View File

@ -29,12 +29,12 @@ http {
listen [::]:80 default_server;
server_name _;
root /var/www/html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
root /var/www/html;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
@ -46,4 +46,4 @@ http {
gzip off;
}
}
}
}