config file for only static files.

Amer Shah amerrahman at gmail.com
Sun Apr 6 12:56:00 MSD 2008


Ahh now I get it. Makes sense.

It's quite an easy fix for me because among the hundreds of gzipped files I
have (and no matching .htm files) I only have to make sure that I have an
htm version of index.htm.gz lying around since that's
the only one referenced in ngx_http_index_module .

Thanks for your help and patience Igor.

Amer.

On Sun, Apr 6, 2008 at 4:51 AM, Igor Sysoev <is at rambler-co.ru> wrote:

> 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/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080406/5fb1c1ab/attachment.html>


More information about the nginx mailing list