config file for only static files.

Igor Sysoev is at rambler-co.ru
Sun Apr 6 12:51:09 MSD 2008


On Sun, Apr 06, 2008 at 04:36:37AM -0400, Amer Shah wrote:

> Yes this indeed was the problem. Thanks guys, you're the best!
> 
> What I don't get though is why when I hit index.htm directly it works (even
> though there is no index.htm but only index.htm.gz) but not when i hit the
> www.hostname.com .. In both cases I am using the same client (browser).
> Shouldn't in both cases, I be served with the gz file ?

Because your browser supports gzipped content and it (browser) is not
disabled in your configuraiton.

ngx_http_index_module tests index.htm existance only. It does not know
anything about any .gz files.

> On Sun, Apr 6, 2008 at 4:26 AM, Dave Cheney <dave at cheney.net> wrote:
> 
> > There is your problem, you need the source, non gzip'ed file for clients
> > that don't request content-encoding. From my understanding, nginx locates
> > the requested file, then looks aside for a gziped version if gzip_static is
> > enable (and the original file has a matching mime type?)
> >
> > Cheers
> >
> > Dave
> >
> >
> > On 06/04/2008, at 6:16 PM, Amer Shah wrote:
> >
> > > There is no index.htm .. I'm using gzip_static and only have
> > > index.htm.gz there .
> > >
> > > DX-20070509-049# ls -l /usr/local/www/data/index.htm.gz
> > > -rw-r--r--  1 root  www  5552 Apr  6 03:49
> > > /usr/local/www/data/index.htm.gz
> > >
> > >
> > > Also note that when i do www.hostname.com/index.htm , it works fine.
> > >
> >
> >
> >

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





More information about the nginx mailing list