mirror of
https://github.com/cloudpanel-io/vhost-templates.git
synced 2026-05-18 08:23:31 +08:00
Merge pull request #42 from kimdre/patch-1
block Wordpress XML-RPC endpoint
This commit is contained in:
@@ -31,6 +31,10 @@ server {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location = /xmlrpc.php {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~/(wp-admin/|wp-login.php) {
|
||||
#auth_basic "Restricted Area";
|
||||
#auth_basic_user_file /home/site-user/.htpasswd;
|
||||
@@ -117,4 +121,4 @@ server {
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ server {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location = /xmlrpc.php {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~/(wp-admin/|wp-login.php) {
|
||||
#auth_basic "Restricted Area";
|
||||
#auth_basic_user_file /home/site-user/.htpasswd;
|
||||
@@ -110,4 +114,4 @@ server {
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ server {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location = /xmlrpc.php {
|
||||
deny all;
|
||||
}
|
||||
|
||||
{{settings}}
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
@@ -58,4 +62,4 @@ server {
|
||||
if (-f $request_filename) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user