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: