I have a main server that points to threepixelslab.gr using cloudflare cdn; let’s call it Server A.
I opened a second server that I want to point to aggelies.threepixelslab.gr; let’s call it Server B
I have letsencrypt running on both servers. Both servers are running the latest Ubuntu and nginx versions.
When I finished my setup on server B I got a 502 bad gateway error. I suppose I have done something wrong with my A and CNAME records. I haven’t done that kind of complex subdomain on different server again so please bare with me. Below follows a screenshot of my records in CF:
When I go to the aggelies subdomain, the server sends me content: content-type : application/octet-stream
So it’s not a 502, but it’s probably not what you want, as my browser thinks I’m trying to download something.
Also, you can’t proxy www for a subdomain because the Cloudflare certificate only covers first level subdomains. You’d need the $10/month cert with custom hostnames for that. Fortunately, it doesn’t look like you mean to use www for that subdomain…so you’ll probably be better off deleting that www.aggelies entry.