我有一个二次开发WordPress的网站。 (Centos 6.6 x86,LAMP)由于网站的规模越来越大。 (300GB +)。 现在我有3台服务器。
域名:www.example.com
server1 172.192.22.01 /var/www/public_html /music /video server2 172.192.22.02 /var/www/public_html /article /photo server3 172.192.22.03 /var/www/public_html /products /showroom
现在3 ips正在域DNS中设置。 我可以访问www.example.com/music ,但当我无法访问www.example.com/article或www.example.com/products 。
The requested URL /article was not found on this server.
如何configuration,以便它可以自动访问。
www.mydomain.com/music/xxx mapping to server with 172.192.22.01 www.mydomain.com/article/xxx mapping to server with 172.192.22.02 www.mydomain.com/products/xxx mapping to server with 172.192.22.03
代理? 共享文件夹? 还是集群? 我读了很多文章,并尝试了很多方法,但仍然没有为我工作。
严格地说(假设我已经正确地理解了这个问题),你可以很好地用反向代理来解决这种情况。 在过去,我已经用这种方式使用了Apache,它运行得非常好。 所以你的问题是,你想透明地访问三个服务器上的一个域。 换句话说,你正试图平衡域上的负载。 看看这些如何。 他们解释得比我好。
http://www.apachetutor.org/admin/reverseproxies
希望这是有帮助的。