mod_zip usage - invalid file list from upstream

sdee nginx-forum at
Wed Oct 3 01:13:29 UTC 2012

I have now solved this issue, so for anyone elses benefit the problem was
due to this issue reported in the link below.

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_redirect off;
        proxy_set_header  Accept-Encoding identity;

Posted at Nginx Forum:,230510,231345#msg-231345

More information about the nginx mailing list