nginx
Build an nginx server block, with the directives that have to accompany the one you actually wanted.
Almost nobody writes nginx config from scratch; they find one that nearly works and edit it. That is where the problems come from, because the directive you need is rarely alone. `proxy_pass` on its own drops WebSockets and hides the client IP. A single `add_header` inside a location block silently discards every header inherited from the server block. HSTS is remembered by browsers for a year whether or not you meant it.
So this emits the accompanying directives too, and says what each one costs before you install it. Static sites, single-page apps and reverse proxies each get a correct `try_files` or proxy setup, with the caching split that matters — hashed assets immutable, HTML always revalidated, because that is the difference between a fast site and one serving a stale page pointing at chunks a deploy has already replaced.
What people open it for
- Writing a server block for a new site without copying one from a blog
- Getting proxy_pass right for an app that uses WebSockets
- Setting cache headers so a deploy does not strand visitors on a stale page
- Adding security headers without silently dropping them in a location block