Error 521 using Cloudflare SSL "Full" option but sort of working using "Flexible" option
Whenever I connect my instance to my domain through CloudFlare, I get error 521. When I change SSL/TLS mode to Flexible instead of Full, it does load pages, but pages are distorted. All content is distorted.
As Cloudflare explains on their Community Site, a 521 error indicates that Cloudflare was not able to connect to your site. They also explain that their SSL Flexible option will establish an HTTPS connection between Cloudflare and the client, but Cloudflare will connect via HTTP to your server. This would lead me believe that your site is being served via HTTP and not HTTPS, which would explain why Cloudflare can't connect to the Linode in Full mode.
As a first step, I would recommend you check if your site is running in HTTPS. A quick way of doing this might be to visit your IP directly from your browser using
https://yourip. You can also check inside the Linode to see if you see port 443 is being used by the web server by running the following command:
ss -plunt | grep 443
If you want to know how to serve your site via HTTPS, we have a guide you can use as reference:
We also have a guide on setting up SSL with Cloudflare in case you'd like to have more information:
Once your site is good to go with HTTPS, CloudFlare shouldn't have an issue when trying to connect to your site in Full mode.