Masking / Pointing subdomain to different server and keeping same url in address
This may be a question for Server Exchange but I am starting to feel pretty cozy here and I feel like someone here will definitely know the answer. We are currently rebuilding a php site in rails and have the new site that is being rebuilt on a linode box [nginx]. The live domain lives on a slicehost box [also niginx]. Upon launch we are planning on forwarding the complete site to the linode box but would like to set up a subdomain (beta.domain.com) for testing purp开发者_如何学Pythonose. I know we can do a simple forward / CNAME record but we would like to maintain the same beta.domain.com address.
Any and all help is greatly appreciated.
Note: We currently have complete control over both domains.
It is a question for ServerFault. You will probably get much better answers there, but I'll do what I can...
AFAIK, you have two options:
simply change your dns to point to the new server. If you don't need to preserve the old server for any reason, then this is the way to go. (I'm assuming there's some reason why this isn't an option in your case).
have the box at beta.domain.com (the slicehost box) act as a proxy to the new linode box. In this case, all the requests come in to slicehost, run through that box, and back out to linode, and the responses go back via the same route. So you'll pay for double bandwidth (at least) using this approach -- I do not recommend proxying like this unless you have no other options.
精彩评论