Configuration Primer

mike mike503 at gmail.com
Wed Mar 18 22:38:42 MSK 2009


i don't like having to do

location \.php {
  stuff
}

location /foo {
   auth basic stuff
    ... and i have to do the php stuff again
}

i guess there's no real way around it, really. it's just a gripe i
have, i suppose. perhaps some way of inheriting all locations globally
first and then doing second level, then third level, etc...

On Wed, Mar 18, 2009 at 8:57 AM, Reinis Rozitis <r at roze.lv> wrote:
>> My biggest issue is with location blocks. It is still confusing and
>> gets annoying on sites requiring multiple location blocks, especially
>> with regexps and determining the right ^~ or *~ etc.
>
> The biggest issue in my mind is the way nginx doesnt merge/inherit (
> http://wiki.nginx.org/NginxHttpCoreModule#location ) the options for
> different location blocks if there are more than one that matches.
> It can be handy sometimes but usually it has created me more issues and some
> nasty workarrounds than helped.
>
>
> Like sometimes there is the need to have:
>
> location ~ ^/zzz { ... }
>
> But if you have the default location ~ \.php$ { .. } defined before
>
> It means that the /zzz/some.php requests wont use any options you defined in
> the config.
>
>
>
> I have whined about this (and also about global location feature in the
> http{} scope) to Igor some time ago but he was sceptical at that time ;)
>
> rr
>
>





More information about the nginx mailing list