Skip to content

Commit

Permalink
Create nginx-nested-locations.md
Browse files Browse the repository at this point in the history
  • Loading branch information
petermekhaeil authored Sep 18, 2023
1 parent bc7d1b5 commit 8b917ac
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions learnings/nginx-nested-locations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Nginx Nested Locations

```
server {
location /app {
location /app/assets {
# ...
}
location /app/pages {
# ...
}
}
}
```

Nested locations are not relative to the parent location.

- `location /app` parent location block that matches requests starting with `/app`.
- `location/app/assets` nested location that matches `/app/assets`.
- `location/app/pages` nested location that matches `/app/pages`.

0 comments on commit 8b917ac

Please sign in to comment.