我无法让 Apache 和 Torquebox/JBoss 一起工作。
版本:
- 阿帕奇 2.2.15
- 扭矩箱 2.3.0
- 导轨 2.3.18 和 3.2.13
所有应用程序都直接通过 Torquebox 部署并正常工作。我在 Torquebox 中使用默认端口的 100 端口偏移,这意味着应用程序在 myserver:8180/my-app 上可用。
这是我的默认站点的配置:
<VirtualHost *:80>
ServerAdmin myemail@my.domain
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/httpd/access.log combined
ServerSignature On
</VirtualHost>
每个应用程序都有自己的 Apache 配置文件,其中包含如下行:
ProxyPass /my-app ajp://localhost:8109/my-app
但是,当我尝试访问应用程序时,我收到一条 Forbidden (403) 错误消息:
You don't have permission to access /my-app/ on this server.
Apache 在其 error.log 中为每个失败的请求生成以下内容:
[Wed Apr 24 07:37:03 2013] [error] [client #{ip address}] client denied by server configuration: proxy:ajp://localhost:8109/my-app/
Torquebox 日志没有相应的条目,所以我相信请求永远不会发送到 Torquebox。
我通过管理控制台验证了 Torquebox/JBoss 确实启用了 AJP。我还检查了系统上的文件权限 - Apache 用户对其所有配置文件和所有应用程序文件夹具有读取权限。据我所知,Apache 配置本身与另一台服务器上的正常工作相匹配。
有什么我想念的想法吗?