Compare commits
1 Commits
mitigation
...
main
Author | SHA1 | Date | |
---|---|---|---|
28bfd07956 |
15
nginx.conf
15
nginx.conf
@ -1,17 +1,23 @@
|
|||||||
location ~ ^/(wp-cron\.php|wp-config\.php|install\.php|xmlrpc\.php|config\.php|configuration\.php|\.env|\.git/|\.svn/|\.log$) {
|
location ~ ^/(wp-cron\.php|wp-config\.php|install\.php|xmlrpc\.php|config\.php|configuration\.php|\.env|\.git/|\.svn/|\.log$) {
|
||||||
# deny all;
|
# deny all;
|
||||||
# return 404;
|
return 404;
|
||||||
rewrite ^(.*)$ /error-404/ redirect;
|
# rewrite ^(.*)$ /error-404/ redirect;
|
||||||
|
# add_header X-Status 404;
|
||||||
|
# rewrite ^(.*)$ /error-404/ last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_page 404 /error-404/;
|
||||||
|
|
||||||
location ~ (LICENSE|\.md$|license\.txt|\.htaccess|readme\.html|readme\.txt) {
|
location ~ (LICENSE|\.md$|license\.txt|\.htaccess|readme\.html|readme\.txt) {
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
access_log off;
|
access_log off;
|
||||||
rewrite ^(.*)$ /error-404/ redirect;
|
return 404;
|
||||||
|
# rewrite ^(.*)$ /error-404/ last;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^/wp-json/wp/v2/users(/.*)?$ {
|
location ~* ^/wp-json/wp/v2/users(/.*)?$ {
|
||||||
rewrite ^(.*)$ /error-404/ redirect;
|
return 404;
|
||||||
|
# rewrite ^(.*)$ /error-404/ last;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Direct PHP File Access
|
# Direct PHP File Access
|
||||||
@ -37,4 +43,3 @@ location ~* /xmlrpc.php$ {
|
|||||||
allow 192.0.0.0/16;
|
allow 192.0.0.0/16;
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user