【发布时间】:2016-01-26 19:43:27
【问题描述】:
我和我的室友都有一个我们正在尝试设置的单独的网络服务器。我们正在尝试使用 mod_proxy,以便他的服务器根据服务器名称将请求转发到我的机器(我们在一个路由器后面有两台单独的机器)。我已经给出了我们目前在 apache 配置中的基础知识,但是在尝试访问第二个域(第一个 www 域,工作正常)时,我们遇到了 403 Forbidden 错误。
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www
ServerName www.<domain1>.com
</VirtualHost>
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://<IP addr of other box>:80
ProxyPassReverse / http://<IP addr of other box>:80
ServerName <dummydomain>.gotdns.com
</VirtualHost>
【问题讨论】: