From fcc707aa6541145e19ca4f82c091757967bb2e70 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 8 Aug 2021 19:57:37 +0200 Subject: [PATCH] fix: location order in nginx con --- nginx.conf.template | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nginx.conf.template b/nginx.conf.template index 10ac90f..c3d69b4 100644 --- a/nginx.conf.template +++ b/nginx.conf.template @@ -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; + } }