Web
nginx as a Reverse Proxy: Headers, WebSockets and Timeouts
What the backend really receives behind nginx: proxy_pass URI rewriting, Host and X-Forwarded headers, WebSocket upgrades, 504s from timeouts, and streaming.
Topic
What the backend really receives behind nginx: proxy_pass URI rewriting, Host and X-Forwarded headers, WebSocket upgrades, 504s from timeouts, and streaming.
Not first match, not longest match, but a mix of both. A test config where every location names itself shows exactly how nginx picks one, and where it surprises.
try_files checks files in order and only the last argument redirects. Static clean URLs, a PHP front controller with php-fpm, and the upload exploit it prevents.