4

I am using apache 2.2 and JBOSS. My domain is at 80 port and apache server is running on 80 port. My war file is running on jboss port 8080. I use mod_jk(connector between apache 2.2 to jboss) to call my application from domain. For static file I use JkUnMount in httpd.conf and serve file from a directory.

My problem is:- When i download a static file from domain(means apache 2.2), no progess bar come in any browser. And same file when I download through IP with 8080(means jboss) then progess bar come in all browsers.

application configuration in 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>

Response after 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

Response after 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
  • What does "progress bar" mean to you? – glend Jun 05 '15 at 09:04
  • When i open chrome://downloads/ in chrome browser, I can see how much data is downloaded. I am calling this progress bar. In apache 2.2, First complete file is downloaded then entry go to chrome://downloads/ – Ashish Agarwal Jun 05 '15 at 09:07
  • I'm going to guess that there isn't really a problem here. If there is it seems more like a problem to do with Chrome rather than your setup. I'm going to guess that Chrome realized you had previously downloaded the same file and instead created a copy of the existing file rather than re-downloading the file from the server. Clear your cache and download folder between tests. – glend Jun 05 '15 at 09:23
  • No there is some problem in apache configuration. All files(including new) using apache is downloaded first then Entry is added in chrome://downloads/. And for other server, First entry go to chrome://downloads/ then show progress and complete on 100%. – Ashish Agarwal Jun 05 '15 at 10:01
  • I see, so the problem you are experiencing is that your browser is unable to detect the size of the file you are downloading and as a result unable to determine a percentage of the file downloaded. Instead what you are seeing is "Unknown file size" download. Can you confirm this is the issue? – glend Jun 05 '15 at 10:05
  • As i mention in my question. When i use **curl -I http://domain.com/js/a.zip**, It shows Content-Length in response. Is there any other way to check "Unknown file size"? and what is solution in apache 2.2 to solve it. – Ashish Agarwal Jun 05 '15 at 10:28

0 Answers0