I keep getting a error 521 on a site I have running the one-click WordPress install on a Ubuntu droplet. I saw on Cloudflare’s website that you need to make sure their IPs are whitelisted which I did through the firewall in networking. The SSL I have activated currently is Full (non strict). I found another thread that suggested running this command: iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
This did not solve the issue for me. What is odd is that I can refresh the page sometimes and it lets me go to the site, but when I navigate to another page it happens almost every time, but again allows me to go through if I refresh.
Any help would be greatly appreciated!
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!
Hello,
In order to use the Full SSL option provided by Cloudflare you need to make sure that you have an SSL certificate installed on your Droplet as well.
If this is not the case, what I could suggest is changing the SSL mode from Full to Flexible and then it should fix the problem for you.
Hope that this helps! Regards, Bobby
Spent 3 hours debugging this and finally realized that mod ssl was not enabled on a fresh LAMP Stack. Experienced this on 4 new LAMP servers on Ubuntu 20.04. It seems like it does not come with mod ssl enabled by default. :facepalm
For anyone experiencing this, run the code below in the terminal
a2enmod ssl
service apache2 restart
Whitelisting all Cloudflare IP v4 and v6 ranges with this script helped to solve the problem in my case:
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.