nginx mitigations
This commit is contained in:
20
nginx.conf
Normal file
20
nginx.conf
Normal file
@ -0,0 +1,20 @@
|
||||
location ~ ^/(wp-cron\.php|wp-config\.php|install\.php|xmlrpc\.php|config\.php|configuration\.php|\.env|\.git/|\.svn/|\.log$) {
|
||||
# deny all;
|
||||
# return 404;
|
||||
rewrite ^(.*)$ /error-404/ redirect;
|
||||
}
|
||||
|
||||
location ~ (LICENSE|\.md$|license\.txt|\.htaccess|readme\.html|readme\.txt) {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
rewrite ^(.*)$ /error-404/ redirect;
|
||||
}
|
||||
|
||||
location ~* ^/wp-json/wp/v2/users(/.*)?$ {
|
||||
rewrite ^(.*)$ /error-404/ redirect;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
Reference in New Issue
Block a user