您的位置:首页 > 运维架构 > Apache

Proxy and site on same port with Apache 2.2

2012-04-28 18:21 387 查看
# sites-enabled/site
NameVirtualHost *: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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  apache debian go
相关文章推荐