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?
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!
<blockquote>After I removed the code using this method</blockquote> <br><strong>Make sure you go over your code and try to find any vulnerabilities that could have caused that.</strong> Simply deleting the “bad” code is not enough. <br><blockquote>nginx: configuration file /etc/nginx/nginx.conf test failed</blockquote> <br>There’s an error in your configuration file. What’s the output of <pre>nginx -t</pre>?
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.