How to Rate Limit Requests to Specific PHP Files with Nginx

WordPress login and XML-RPC endpoints at wp-login.php and xmlrpc.php respectively are the mostly widely abused targets for bots scanning the web for sites with weak passwords. Here is a simple Nginx configuration snippet that allows you to set the limit_req depending on the request path and method. First, define the limit_req_zone at the http {} [ ] Read more