13
Jul
2022

WordPress 禁止xmlrpc.php和限制wp-login.php

location = /xmlrpc.php { deny all; }

location ~ .php$ {
location ~ \wp-login.php$ {
allow 142.114.32.87;
deny all;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass unix:/run/php-fpm/www.sock;
}
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass unix:/run/php-fpm/www.sock;

}

You may also like...