【发布时间】:2014-06-20 04:16:44
【问题描述】:
我试图在运行 Ubuntu Service 13.04 64 位的 VPS 主机上同时运行 Apache 和 Tomcat7,但无法通过 AJP 连接器将它们连接在一起。我已经阅读了教程,直到我的眼睛流血,没有运气。我已经安装了 mod-proxy-ajp 模块。
我在 Tomcat 的 server.xml 文件中取消了 AJP 连接器的注释。这是来自 /etc/apache2/sites-available 的我的站点文件(符号链接到 /etc/apache2/sites-enabled):
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.mysite.org
ServerAlias mysite.org
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Deny from all
Allow from localhost
</Proxy>
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ErrorLog ${APACHE_LOG_DIR}/mysite.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/mysite.access.log combined
</VirtualHost>
即使这样,尝试访问 http://www.mysite.org 也会出现 403 错误,消息是“您无权访问此服务器上的 /。”
我的虚拟主机配置有什么问题吗?
杰森
【问题讨论】: