Why is this file not being gzipped?

Igor Sysoev is at rambler-co.ru
Sun Aug 24 10:00:23 MSD 2008


On Sat, Aug 23, 2008 at 10:57:33PM -0700, mike wrote:

> what would be the appropriate regex for
> 
> if files do NOT match *.css {
>  gzip off;
> }


server {

    gzip off;

    locaiton / {
        # static
        ...
    }

    location ~* \.php$ {
        # fastcgi
        ...
    }

    location ~* \.css$ {
        gzip on;
    }

> 
> On 8/23/08, Igor Sysoev <is at rambler-co.ru> wrote:
> > On Sat, Aug 23, 2008 at 10:27:22PM -0700, mike wrote:
> >
> > > yes, sorry. removed.
> >
> > Yes, it is not compressed. However, in my local tests it's compressed.
> > Could you create debug log for this request ?
> >
> > > On 8/23/08, Igor Sysoev <is at rambler-co.ru> wrote:
> > > > On Sat, Aug 23, 2008 at 12:47:22PM -0700, mike wrote:
> > > >
> > > > > http://media.xmike.com/css/style.css
> > > > >
> > > > >         gzip on;
> > > > >         gzip_static on;
> > > > >         gzip_proxied any;
> > > > >         gzip_min_length 1100;
> > > > >         gzip_buffers 16 8k;
> > > > >         gzip_comp_level 4;
> > > > >         gzip_types text/plain text/css application/x-javascript
> > > > > text/xml application/xml application/xml+rss text/javascript;
> > > > >         gzip_disable "MSIE [1-6]\.";
> > > > >         gzip_vary on;
> > > > >
> > > > > It's a text/css file. It's 2331 bytes. Is it too small?
> > > > > gzip_min_length is set to 1100...
> > > > >
> > > > > Just wondering.
> > > > >
> > > > > I did gzip it manually (for gzip_static) and it does work as designed.
> > > > > But I want to make sure that I've got the right configuration down for
> > > > > normal, non-pre-gzipped files.
> > > >
> > > > Could you remove the pre-gzipped file now ?
> > > >
> > > >
> > > > --
> > > > Igor Sysoev
> > > > http://sysoev.ru/en/
> > > >
> > > >
> >
> > --
> > Igor Sysoev
> > http://sysoev.ru/en/
> >
> >

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





More information about the nginx mailing list