The location directive

Thomas Love tomlove at
Fri Apr 8 17:08:44 MSD 2011

On 8 April 2011 04:32, Maxim Dounin <mdounin at> wrote:

There were lots of such discussions, and the only expected answer
> to all proposals to add global/continue/whatever locations which
> alter configuration is: no.
> The reason is simple: with large config it's practically
> impossible to find out how requests will be processed when
> such "global" locations are present.

I should have been clear -- global/continue/whatever are not the same thing.
A "continue" location is tested in the normal order. This means there's a
possibility it's _not_  processed even if it matches, if it comes after a
normal match-and-break location in nginx's testing order.

Assuming you meant what I did by "continue", I'm not sure whether you are
saying simply that it's difficult for users to understand such configs, or
whether you're saying the processing actually is undefined.

If it's the former, then, is it not the case that:

a) (likely very many) large configs wouldn't be so large if they used
"continue" locations
b) the cheapest alternative is nested locations, which are themselves
difficult to understand, and
c) existing users need not implement it

The idea is to simplify the configs of new and ordinary users, and to
provide a compact alternative to common nesting motifs.

If on the other hand you are saying that there are cases where processing
somehow becomes undefined when using a "continue" location, can you provide
an example (which does not occur for an equivalent nested directive)?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list