Directive reference
location
Selects configuration by request URI.
| Syntax | location [= | ~ | ~* | ^~] uri { ... } | location @name { ... } |
|---|---|
| Contexts | serverlocation |
| Default | none |
Behavior
Xin implements nginx's exact, prefix, regular-expression and named-location selection order. Nested locations and internal redirects use the same phase model.
Example
location /assets/ {
root /srv/www;
}
location = /health {
return 200 "ok\n";
}