Report this

What is the reason for this report?

502 bad gateway nginx/WordPress

Posted on December 22, 2013

Hello!

I’ve WordPress running on nginx, fastCGI. Currently I’m having issues on my droplet, when I try to load my domain I’m getting 502 bad gateway error.

My site was infected with malware. Every PHP on server had a code with base64_decode() in it and I managed to remove it by using the method in [1]. After I removed the code using this method, I got a 502 bad gateway and when I tweaked my config using articles I found on various site, I ended up getting “Unable to connect” message on my browser.

When I run the command service nginx start I get the following error. nginx: configuration file /etc/nginx/nginx.conf test failed

And sudo service nginx status

gives me * could not access PID file for nginx

Any suggestions on getting around this?

[1] - http://devilsworkshop.org/remove-evalbase64decode-malicious-code-grep-sed-commands-files-linux-server/

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.