【发布时间】:2012-11-22 15:18:06
【问题描述】:
我使用 Jboss +Apache 解决方案。 [请看下面我的 httpd-vhost.conf 文件]
我试图从代理重定向中排除我的图像文件夹。
我尝试做的是,当我使用 http://www.mysite.com/images 和 https时,从 /usr/local/images/ 别名中选择图像>://www.mysite.com/images 链接。
这在虚拟主机端口 80 上运行良好,但是当我在虚拟主机端口 443 上进行相同配置时,它不会从 /usr/local/images/ 别名中获取图像并重定向到 Jboss。
换句话说,http://www.mysite.com/images 链接有效,但 https://www.mysite.com/images 无法使用相同的配置。
另外请注意,其余的 SSL 配置工作正常。我可以毫无问题地访问https://www.mysite.com。
有人可以帮忙吗?
<VirtualHost www.mysite.com:80>
ServerName www.mysite.com
ProxyPreserveHost On
ProxyPass /images !
Alias /images/ /usr/local/images/
ProxyPass / http://www.mysite.com:8080/
ProxyPassReverse / http://www.mysite.com:8080/
</VirtualHost>
<VirtualHost www.mysite.com:443>
ServerName www.mysite.com
SSLEngine On
SSLCertificateFile "\jboss-5.1.0.GA\server\default\conf\mysite.crt"
SSLCertificateKeyFile "\jboss-5.1.0.GA\server\default\conf\mysite.key.insecure"
ProxyPreserveHost On
ProxyPass /images !
Alias /images/ /usr/local/images/
ProxyPass / http://www.mysite.com:8080/
ProxyPassReverse / http://www.mysite.com:8080/
</VirtualHost>
<Directory /usr/local/images/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
【问题讨论】:
-
我错误地上传了错误的 httpd-vhost.conf 文件。现在我已经更正了。
标签: apache2 apache-config