Proxy and site on same port with Apache 2.2

来源:互联网 发布:java网页游戏开发 编辑:程序博客网 时间:2024/05/23 13:51
# sites-enabled/siteNameVirtualHost *:80<VirtualHost *:80>  ServerName site.com</VirtualHost># sites-enabled/proxy<VirtualHost *:80>  #ServerName not important  ProxyRequests On</VirtualHost>



When using Debian style sites-enabled, make sure Proxy site goes BEFORE actual site in alpha order, i.e. 00proxy vs site

Reason:

Proxy requests having "Host" field set to destination site, i.e. google.com or anything. This will result in matching none of the VirtualHosts' ServerName, and will go to First VirtualHost regardless of ServerName settings.
原创粉丝点击