A front-controller pattern written with if and rewrite works and is slower and harder to reason about than the two-line version. try_files is a single directive evaluated once,…
A percentage-based canary needs a load balancer that supports weighting; a header-based one needs an nginx map and works anywhere. Deciding on a header means the team can…
A cache that expires and then blocks every waiting request on one slow origin fetch is a cache that makes the worst moment worse. proxy_cache_lock alone removes the…
A heredoc expands variables and command substitutions by default, which is convenient for a template and disastrous for anything containing a dollar sign belonging to another language. One…
Behind a proxy, $remote_addr is the proxy — and reading X-Forwarded-For instead is correct only if you also refuse to believe it from anyone but the proxy. This…
OCSP stapling saves the client a round trip to the certificate authority, and the configuration is completely inert without one extra line that nothing warns about. nginx needs…