nginx
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| nginx [2026/01/08 00:03] – lex | nginx [2026/01/08 00:39] (current) – lex | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| '' | '' | ||
| '' | '' | ||
| - | == Logic == | + | === Logic === |
| Nginx divides it into prefix locations and regex locations. It starts going through prefix locations, selecting the longest that matches. With that selection, nginx runs through the regex matches. If '' | Nginx divides it into prefix locations and regex locations. It starts going through prefix locations, selecting the longest that matches. With that selection, nginx runs through the regex matches. If '' | ||
| + | === Examples === | ||
| < | < | ||
| location / { | location / { | ||
| - | root /data/www; | ||
| } | } | ||
| </ | </ | ||
| - | / refers to the URI, so in this case the root URI\\ | + | Matches with '' |
| - | So the above returns files in ''/ | + | |
| < | < | ||
| location /images/ { | location /images/ { | ||
| - | root /data; | ||
| } | } | ||
| </ | </ | ||
| - | Returns files in /data/images/ | + | Matches with '' |
| < | < | ||
nginx.1767830601.txt.gz · Last modified: by lex
