fix: location order in nginx con

This commit is contained in:
Matthieu Bessat 2021-08-08 19:57:37 +02:00
parent 09608ab8bb
commit fcc707aa65

View file

@ -5,16 +5,6 @@ server {
location / { location / {
try_files $uri $uri/ /index.php?$args; try_files $uri $uri/ /index.php?$args;
} }
location /config.php {
return 404;
}
location ~ \.php$ {
fastcgi_pass unix:{{PHP_SOCKET}};
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
location ^~ /wp-admin { location ^~ /wp-admin {
return 403; return 403;
} }
@ -42,4 +32,11 @@ server {
location ^~ /configure_nginx.php { location ^~ /configure_nginx.php {
return 403; return 403;
} }
location ~ \.php$ {
fastcgi_pass unix:{{PHP_SOCKET}};
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
} }