我正在使用apache 2.2和JBOSS。我的域名是80端口,apache服务器在80端口上运行。我的war文件在jboss端口8080上运行。我使用mod_jk(apache 2.2到jboss之间的连接器)从域调用我的应用程序。 对于静态文件,我在httpd.conf中使用JkUnMount并从目录中提供文件。
我的问题是: - 当我从域下载静态文件(意味着apache 2.2)时,任何浏览器都没有进入progess栏。当我通过IP下载8080(意味着jboss)时,同样的文件,然后progess栏进入所有浏览器。
httpd.conf中的应用程序配置
<VirtualHost *:80>
# Serve URI's:
ServerName xyz
ServerAdmin abc@abc.com
# Serve all pages in tomcat
JkMount /FGDocumentDistribution loadbalancer
JkMount /FGDocumentDistribution/* loadbalancer
# Except the static pages
JkUnMount /FGDocumentDistribution/resources/* loadbalancer
JkUnMount /FGDocumentDistribution/downloads/* loadbalancer
# JkMount /jmx-console loadbalancer
# JkMount /jmx-console/* loadbalancer
# Map the static pages to the new location.
DocumentRoot C:/firstgroup-dda/staticdata
RewriteEngine On
RewriteRule ^/FGDocumentDistribution/resources/(.*)$ C:/firstgroup-dda/staticdata/resources/$1
RewriteRule ^/FGDocumentDistribution/downloads/(.*)$ C:/firstgroup-dda/staticdata/FileBackUp/downloads/$1
</VirtualHost>
# Make sure the static data is accessible.
<Directory "C:/firstgroup-dda/staticdata">
Options +Indexes
Allow from all
AllowOverride All
Order allow,deny
FileETag All
EnableSendfile On
# Authentication
# AuthType Basic
# AuthName "Restricted test area"
# Require valid-user
</Directory>
curl -I http://domain.com/js/a.zip
后的响应 HTTP/1.1 200 OK
Date: Fri, 05 Jun 2015 07:46:20 GMT
Server: Apache/2.2.24 (Win32) mod_ssl/2.2.
Last-Modified: Mon, 10 Nov 2014 11:12:00 G
ETag: "600000001cfda-4398e2-5077f3b426000"
Accept-Ranges: bytes
Content-Length: 4430050
Content-Type: application/x-rar-compressed
curl -I http://ip:8080/js/a.zip
后的响应 HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1
Accept-Ranges: bytes
ETag: W/"4430050-1415617920000"
Last-Modified: Mon, 10 Nov 2014 11:12:00 GMT
Content-Length: 4430050
Date: Fri, 05 Jun 2015 07:48:59 GMT