Some people are reporting that my LEMP website is giving a 502 error. I’ve seen this myself from one public wifi point. I never see it anywhere else. My logs are filled with these errors:
2016/08/16 06:59:02 [error] 3618#0: *1445992 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 158.255.5.191, server: 178.62.65.221, request: “POST /xmlrpc.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “178.62.65.221” …
…which I assume are related. Any ideas what’s going on here and how to fix it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
xmlrpc.php is a script present in WordPress installations that is a target for attacks. The traffic you are seeing which is likely the cause of the 502 errors is attempts to attack your server via this method. One way to help prevent this would be to edit your nginx configuration file in /etc/nginx/sites-enabled/ to add the following section inside the server block:
location /xmlrpc.php {
deny all;
}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.