Today I have installed the LAMP stack on Ubuntu distro on a new server. This went well as far as I could verify.
Then I configured subdomain. sub.mydomain.com on a domain which is already on Cloudflare. Since the installation was on a new IP (not the one my main domain is running on) I created a A record for this subdomain.
But…when I navigate to the IP adres, I can see my Apache default page but when I do that via sub.mydomain.com it throws a 521 error Error 521 ## Web server is down.But I can see it serves https from the SSL of CF.
What am I doing wrong here? I expect to see the same default page of Apache.
Cloudflare proxies your domain so it’s normal that there’s a CF certificate showing up. Check the server configuration
A 521 error happens when Cloudflare is unable to make a TCP connection to your origin server. Review the suggestions in this Community Tip for Quick Fix Ideas.