Locations – where, when, and how
The
location
directive may be used within a virtual server section and indicates a URI that comes either from the client or from an internal redirect. Locations may be nested with a few exceptions. They are used for processing requests with as specific configuration as possible.
A location is defined as follows:
location [modifier] uri {...}
Or it can be defined for a named location:
location @name {…}
A named location is only reachable from an internal redirect. It preserves the URI as it was before entering the location block. It may only be defined at the server context level.
The modifiers affect the processing of a location in the following way:
Location modifiers |
Handling |
---|---|
|
This modifier uses exact match and terminate search. |
|
This modifier uses case-sensitive regular expression matching. |
|
This modifier uses case-insensitive regular expression matching. |
|
This modifier stops processing before regular expressions are checked for a match... |