fix: location order in nginx con
This commit is contained in:
parent
09608ab8bb
commit
fcc707aa65
1 changed files with 7 additions and 10 deletions
|
@ -5,16 +5,6 @@ server {
|
|||
location / {
|
||||
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 {
|
||||
return 403;
|
||||
}
|
||||
|
@ -42,4 +32,11 @@ server {
|
|||
location ^~ /configure_nginx.php {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue