Static Sites
Serve HTML, CSS, images, and downloads directly from disk. This is the simplest Fluxheim mode.
When to use it
Use static hosting for documentation, product pages, downloads, and sites that do not need application code on each request.
- ETag and conditional requests reduce repeat traffic.
- Byte ranges work for larger files.
- Dotfiles should stay denied for public roots.
Static site example
[[vhosts]]
name = "docs"
hosts = ["docs.example.com"]
[vhosts.web]
root = "/srv/docs"
index_files = ["index.html"]
deny_dotfiles = true
Main options
| Option | Use it when |
|---|---|
root | You want a bounded filesystem root for public files. |
index_files | A directory should resolve to an index file. |
deny_dotfiles | Hidden files must never become public by accident. |
directory_listing | You intentionally publish repository-style file indexes. |
Repository listing example
[[vhosts.routes]]
name = "repo"
path_prefix = "/repo/"
[vhosts.routes.web]
root = "/srv/repository/public"
index_files = ["index.html"]
[vhosts.routes.web.directory_listing]
enabled = true
exact_size = false
Directory listings stay private-cache by default, skip symlink entries, and still prefer index files when they exist.