DEV Community

Discussion on: How to point cname to nginx server that uses reverse-proxy?

Collapse
 
irgeek profile image
James Sinclair

First, you shouldn't be using a CNAME at the zone apex. It will have strange consequences that will be really difficult to debug.

Second, creatorbrandedsite.tk doesn't match any of learnbot.tk, www.learnbot.tk or *.learnbot.tk so no servers match when creatorbrandedsite.tk is in the host request header. The request, then, will be served by the default server -- that's either one you've identified with default_server or the first one defined in the NGINX config. Is that default server set up to handle requests correctly?

Third, you'll likely get more answers asking things like this on Server Fault

Collapse
 
kp profile image
KP

@irgeek thanks a ton for your response, but I don't quite understand what the solution you are proposing is here.. (I did try to read the article you listed)