Nginx Nested Locations
Nginx supports nested locations:
server {
location /app {
location /app/assets {
# ...
}
location /app/pages {
# ...
}
}
}
Note that nested locations are not relative to the parent location.
In the above example:
location /appparent location block that matches requests starting with/app.location/app/assetsnested location that matches/app/assets.location/app/pagesnested location that matches/app/pages.