Move root out of location context
We are also loading images, (like favicon.ico), these will also redirect to index.php. Side effect, this causes the CSRF to be regenerated in the session.
This commit is contained in:
parent
2c5e73482c
commit
33f675f5fb
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user