对不起,蹩脚的术语 – 我不是一个系统pipe理员…所以这里的交易。 我在同一个networking中有两个Linux机器,让我们通过他们的IP,abcd和efgh来引用这些机器。每个机器运行一些webapp,通常可用,如http://abcd/和http://efgh/ 。 我想要完成的是:用一些Apache Web服务器(它的方式住在两个盒子)configuration巫术,第一个应用程序将可通过http://abcd/whatever1/ ,第二个应用程序将作为http://abcd/whatever2/ – 但仍然驻留在另一台服务器上(efgh)。 长话短说 – 完全可以用Apacheconfiguration魔术来做到这一点,而不必触摸webapps及其configuration? 如果是这样 – 如何? :) 提前致谢!
听起来就像你想要一个反向代理。 使用以下命令更新httpd.conf:
ProxyRequests Off ProxyPass /whatever2/ http://efgh/ ProxyPassReverse /whatever2/ http://efgh/
http:// abcd / whatever2 /现在应该给你你想要的。
您可以使用httpd.conf进行redirect
redirect/ web-page.html http://www.new-domain.com/ destination-web-page.html
要么
.htaccess与redirect
HTH