gzip compression not working

Igor Sysoev is at rambler-co.ru
Wed May 21 21:16:02 MSD 2008


On Wed, May 21, 2008 at 01:00:53PM -0400, Calomel wrote:

> Igor,
> 
> Why do you not need to specify "gzip_types"? Is it because he is using
> "gzip_proxied any;" ?

No. The gzip modules tests Content-Type sequentially, so the shorter
list is the better. The "application/xml, application/xml+rss, text/javascript"
are not defined in nginx's mime.types. However, they may be set by a backend.

> --
>   Calomel @ https://calomel.org
>   Open Source Research and Reference
> 
> 
> On Wed, May 21, 2008 at 08:31:43PM +0400, Igor Sysoev wrote:
> >On Wed, May 21, 2008 at 12:24:39AM -0500, Christian Billen wrote:
> >
> >> Hello,
> >> I have a fresh new installation of nginx on ubuntu 8.04 (installed via
> >> apt-get, I believe it is 0.5.x something)
> >> 
> >> In my nginx.conf file I have gzip turned on, now I wanted to do a basic test
> >> and serving a static html file, but the file does not come compressed at
> >> all.
> >> 
> >> Here's the snippet of configuration, I tried variations on this without
> >> success
> >> 
> >>  gzip  on;
> >>     gzip_min_length  1100;
> >>     gzip_buffers     4 8k;
> >>     gzip_proxied     any;
> >>     gzip_types       text/plain text/html text/css application/x-javascript
> >> text/xml application/xml application/xml+rss text/javascript;
> >>     gzip_http_version 1.1;
> >>     gzip_comp_level 6;
> >> 
> >> Does anyone have any idea why nothing is compressed?
> >> 
> >> I've used this http://www.gidnetwork.com/tools/gzip-test.php and others to
> >> test the results.
> >
> >www.gidnetwork.com send HTTP/1.0 request, which is not gzipped because
> >of "gzip_http_version 1.1".
> >
> >Also, you do not need to set gzip_types, those never be issued by nginx:
> >
> >application/xml, application/xml+rss, text/javascript.
> >
> >It's CPU cycles waste.
> >
> >
> >-- 
> >Igor Sysoev
> >http://sysoev.ru/en/

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list