【发布时间】:2015-05-21 15:33:11
【问题描述】:
Tomcat7 服务器在我的机器上托管一个网站,我想使用 Apache2 作为代理通过我的浏览器查看它:http://localhost:8080/examples as http://localhost/examples。
我已经安装了 Apache2 和 Tomcat7,它们都可以在我的电脑上运行。 我已经加载了 mod_proxy 和 mod_proxy_http 模块
在我的 http_vhosts.conf 文件中,我有:
<VirtualHost *:80>
ProxyRequests off
SSLProxyEngine on
ProxyPreserveHost on
ServerName mathost.workstation.org
ProxyPass /examples http://localhost:8080/examples
ProxyPassReverse /examples http://localhost:8080/examples
ProxyRequests Off
</VirtualHost>
在我的 proxy_http.conf 我有:
ProxyRequests Off
ProxyPreserveHost On
<Location "/examples/">
ProxyPass /examples http://localhost:8080/examples
ProxyPassReverse /examples http://localhost:8080/examples
Order deny,allow
Allow from all
</Location>
它不起作用,apache 日志说“GET /examples/ HTTP/1.1”404 207。
【问题讨论】:
-
error_log 中有任何消息吗?
-
GET /examples HTTP/1.1" 404 206
-
这看起来像 access_log,而不是 error_log。来自 error_log 的消息包含导致错误的附加描述,它在哪里寻找不存在的文件等。
-
啊好的。对。对不起。我没有关于错误日志的消息。反正我解决了这个问题。感谢您的帮助。