当我的网站出现故障时,如何将流量转移到我的备用网站?
我创建了一个 PHP 网站。我已经拥有共享主机并购买了新的 VPS。现在我想从我的新 VPS 启动我的网站,但我想在我的共享主机上保持镜像运行,以防万一我的 VPS 出现故障,我希望流量暂时转移到我的共享主机上。我对此完全陌生,不知道如何执行此操作,也不知道是否应该将其发布在服务器故障上或此处。
我试图用谷歌搜索这个问题,但我找不到这样的东西。请帮忙。
提前致谢。
I have created a PHP website. I already have a shared hosting and bought a new VPS. Now I want to launch my website from my new VPS, but I want to keep a mirror running on my shared hosting and in case if my VPS goes down, I want the traffic to be diverted to my shared hosting for the time being. I am totally new to this and have no idea how can I do this and dont know if this should be posted on Server fault or here.
I tried to google about this, but I am not able to find anything like this. Please help.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找一种负载均衡器或代理,当一个节点出现故障时,它可以将您的请求路由到不同的节点。基本上,您的 DNS 条目将指向代理,该代理将透明地将请求转发到正确的节点。
有一些交钥匙负载均衡器的设置非常简单。首先想到的是Rackspace 云负载均衡器。
I think you are looking for a load balancer or proxy which can route your request to a different node when one node goes down. Basically your DNS entries will point to the proxy, which will transparently forward requests to the correct node.
There are some turn-key load balancers out there which are really simple to set up. Rackspace Cloud Load Balancers are the first that come to mind.
我无法解释它,但我可以向您指出一些资源:
http://library.linode.com/ linux-ha
Linode 是我使用 VPS 的托管公司,他们有一个很好且广泛的教程库。
希望有帮助。
I cant explain it but I can point you to some resources that can:
http://library.linode.com/linux-ha
Linode is a hosting company I use for VPS and they have a nice and extensive library of tutorials.
Hope that helps.