nginx
This commit is contained in:
22
nginx.conf
22
nginx.conf
@ -14,7 +14,27 @@ location ~* ^/wp-json/wp/v2/users(/.*)?$ {
|
||||
rewrite ^(.*)$ /error-404/ redirect;
|
||||
}
|
||||
|
||||
# Direct PHP File Access
|
||||
location ~* /(?:uploads|files|wp-content|wp-includes|akismet)/.*.php$ {
|
||||
deny all;
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* /xmlrpc.php$ {
|
||||
allow 172.0.1.1;
|
||||
allow 192.0.0.0/16;
|
||||
deny all;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user