Hi, What I actually want to do is map my subdomain e.g sub.domain.com to a different IP address. I was actually asked to create a CName record and point it to someothersite.com but this isnt working for me so I was thinking how can I do it from Nginx in such a way that the domain name stays the same sub.domain.com even when the user is browsing on the other site?
A:
The way to do this would be to proxy requests to that subdomain to the other IP address. See the documentation for details.
I'm sure you've already gone through these possibilities, but proxying in this case sounds like doing things the hard way. What errors did the CNAME route give you? Why would you use a CNAME here instead of just changing the A record for sub.domain.com
to the other IP address, and having that server listen for those requests? The proxying strategy may require similar configuration changes on the remote server anyway.
pjmorse
2010-10-07 12:01:28