Report this

What is the reason for this report?

Error 521, web server is down. Wordpress site not working.

Posted on April 11, 2020

Hi all,

I recently added Nginx to my server to host an additional website on my VPS. I got the new website working.

Though now my other website which is a Wordpress website is returning an error when I try to access its URL: Error 521, Web server is down.

I’ve tried my best to find a solution, but I can’t find anything that works for me.

I’d appreciate any advice! :)



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @WhyIsThisMyAlias,

I would recommend starting with the following steps on how to troubleshoot common Nginx problems:

https://www.digitalocean.com/community/questions/how-to-troubleshoot-common-nginx-issues-on-linux-server

Feel free to share the output of the commands here so that I could then try to further advise you.

Regards, Bobby

Hello,

I assume that you’re using a CDN service like CloudFlare. The 521 error will usually occur when there is CDN enabled and it will indicate an issue between your local machine and the server or between the CDN and the server itself.

What I usually recommend is to temporarily disable the CDN in order to determine if the issue lies on the droplet, e.g issue with the web-server (Apache/Nginx) or it is DNS related, or some other issue with the CDN.

Error 521 can also occurs when the origin web server refuses connections from Cloudflare. Security solutions at your origin may block legitimate connections from certain Cloudflare IP addresses.

You can find Cloudflare’s IP rages here:

https://www.cloudflare.com/ips/

You can also make sure that port 443 is open with this command:

  1. iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

Also, you can check our tutorial for whitelisting IPs with iptables:

https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands#service-web-server

If you’re using CloudFlare you can check this post from their community:

https://community.cloudflare.com/t/how-do-i-temporarily-disable-cloudflare/68798/2

Regards

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.