help with my config

Igor Sysoev is at rambler-co.ru
Wed Feb 13 12:32:34 MSK 2008


On Tue, Feb 12, 2008 at 10:48:52PM -0800, Alex Egg wrote:

> As soon as I add the expires section (at the bottom) accel-redirect
> for images stops working.
> 
> Is it apparent why?
> 
> My config:
> 
> http://pastie.caboo.se/151398

I have tired of this "if (-f $request_filename)" pattern.
This became the same ugly pattern as Apache's Auth directives usage in
.htaccess only and lot of RewriteRule's to compencate inability
of PHP programmers to work with URIs different from /index.php.

You should use ^~ in "location ^~ /accounts":

    location ^~ /accounts {
        internal;
        root /u/apps/asdf/shared;
    }

And remove the useless "if (-f $request_filename)" in static location:

    location ~* \.(js|css|jpg|jpeg|gif|png|swf)$ {
        expires      1M;
    }        


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





More information about the nginx mailing list