Welcome! Log In Create A New Profile

Advanced

Re: mod_zip usage - invalid file list from upstream

October 02, 2012 09:13PM
I have now solved this issue, so for anyone elses benefit the problem was due to this issue reported in the link below.

http://code.google.com/p/mod-zip/issues/detail?id=5

Basically if you use a browser (Chrome/Firefox etc) it sets the "Accept-Encoding: gzip,deflate,sdch" HTTP header which nginx forwards when proxying to the upstream Apache server that is generating the zip file list in PHP. This causes Apache to return the zip file list gzip encoded so mod_zip can't read it.

When testing with curl or wget it works without issue as these command line tools don't set a "Accept-Encoding" HTTP header.

To fix this problem I added to the nginx config file the proxy_set_header option as seen below.


location ~ \.php$ {
proxy_pass http://74.112.172.198:82;
proxy_redirect off;
proxy_set_header Accept-Encoding identity;
}
Subject Author Posted

mod_zip usage - invalid file list from upstream

sdee September 04, 2012 06:57PM

Re: mod_zip usage - invalid file list from upstream

sdee October 02, 2012 09:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready