屏蔽/将子域指向不同的服务器并在地址中保留相同的 url
这可能是服务器交换的一个问题,但我开始在这里感到非常舒适,我觉得这里的人肯定会知道答案。我们目前正在 Rails 中重建一个 php 站点,并在 linode box [nginx] 上重建新站点。活动域位于 slicehost 盒子上 [也称为 niginx]。启动后,我们计划将整个网站转发到 linode box,但希望设置一个子域 (beta.domain.com) 进行测试。我知道我们可以做一个简单的转发/CNAME 记录,但我们希望保留相同的 beta.domain.com 地址。
非常感谢任何和所有的帮助。
注意:我们目前对这两个域拥有完全控制权。
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 purpose. 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 ServerFault 的问题。您可能会在那里得到更好的答案,但我会尽我所能...
AFAIK,您有两个选择:
只需更改您的 dns 以指向新服务器。如果您出于任何原因不需要保留旧服务器,那么这就是正确的选择。 (我假设出于某种原因,这在您的情况下不是一个选项)。
让 beta.domain.com 上的盒子(slicehost 盒子)充当新 linode 盒子的代理。在这种情况下,所有请求都会进入 slicehost,通过该框运行,然后返回 linode,响应会通过相同的路由返回。因此,使用这种方法,您将(至少)支付双倍带宽的费用 - 我不建议这样的代理,除非您没有其他选择。
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.