Reverse proxying with Nginx: path-based routing and X-Forwarded headers
Build an Nginx reverse proxy that routes /, /api and /blog to three services with Docker Compose and test every request: how location picks a block, the trailing-slash rule of proxy_pass, X-Forwarded headers and when to trust them, plus production settings such as timeouts, keepalive, buffering and retries.