Hello,
I’m using wordpress on ubuntu server I edited the php.ini file through the console using sudo nano then I used reboot command but the website is showing 521 error and not working
Kind regards
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!
Hi @abdulazizaa,
What WebService are you using, is it Apache or Nginx? It’s possible the issue to be coming from there.
To find out what you are using, you can type:
netstat -tulpen | grep 443
At the end of the line, you’ll see either Apache2 or Nginx. Based on that you’ll know which one you are using. Now, once you know, I’ll urge you to check your error_log which you can find in /var/log/apache2/ or /var/log/nginx/. Once in this folder, reload your website and check the last line of your error_log. If it’s an issue with the WebService, it will display there.
If you are uncertain, you can provide us with the error code here.
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 also make sure that port 443 is open with this command:
- iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
Also, you can check our tutorial for whitelisting IPs with iptables:
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
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.