Serving a static site from one directory
2026-11-28
A static site needs three things: a document root, a certificate and a server that does not invent features. Everything else is preference.
The root stays small. One index.html, one stylesheet, one page per note. When a
directory has fewer than twenty files you can read it in one screen, and that is the point —
the layout is documentation of itself.
Two settings earn their place in the config: server_tokens off keeps the version
out of responses, and client_max_body_size is set deliberately rather than left at
the one megabyte default, which silently breaks every upload that matters.
Access logs are written per site, rotated weekly and kept for a month. If a log line is never read, it is not a log line — it is noise with a timestamp.