diff --git a/nginx-core/etc/nginx/templates/location.d/30-secure.conf.template b/nginx-core/etc/nginx/templates/location.d/30-secure.conf.template index ef02d0c..6029a41 100644 --- a/nginx-core/etc/nginx/templates/location.d/30-secure.conf.template +++ b/nginx-core/etc/nginx/templates/location.d/30-secure.conf.template @@ -6,7 +6,7 @@ location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op]|lock)|~)$ { access_log off; log_not_found off; } -location ~* \.(pl|cgi|py|sh|lua)\$ { +location ~* \.(pl|cgi|py|sh|lua)$ { return 444; } @@ -14,7 +14,7 @@ location ~* (w00tw00t) { return 444; } -location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)\$|^(\..*|Entries.*|Repository|Root|Tag|Template)\$|\.php_ { +location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ { return 444; } diff --git a/nginx-core/etc/nginx/templates/location.d/31-secure-wp.conf.skiped b/nginx-core/etc/nginx/templates/location.d/31-secure-wp.conf.skiped index a3eec75..187e2ce 100644 --- a/nginx-core/etc/nginx/templates/location.d/31-secure-wp.conf.skiped +++ b/nginx-core/etc/nginx/templates/location.d/31-secure-wp.conf.skiped @@ -10,7 +10,7 @@ location ~* wp-includes/js/tinymce/langs/.*.php { deny all; } -location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php\$ { +location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ { deny all; } @@ -18,7 +18,7 @@ location ~* /wp-content/uploads/nginx-helper/ { internal; } -location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|bzip2|7z)\$ { +location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|bzip2|7z)$ { deny all; }