Introduction
Sometimes you want to handle different parts of a website differently. Nested location blocks in nginx let you match URLs inside other matched URLs to apply specific rules.
When you want to serve static files differently inside a specific folder of your website.
When you want to apply special headers or redirects only to a sub-path inside a main path.
When you want to proxy some requests to one backend and others inside that path to a different backend.
When you want to restrict access to a subdirectory but allow the main directory to be public.