Statikus site-ok
HTML, CSS, képek és letöltések kiszolgálása közvetlenül lemezről. Ez a legegyszerűbb Fluxheim mód.
Mikor használd
Használj static hostingot dokumentációhoz, termékoldalakhoz, letöltésekhez és olyan site-okhoz, amelyek nem igényelnek application code-ot minden requestnél.
- Az ETag és conditional request csökkenti az ismétlődő trafficet.
- A byte range-ek nagyobb fájloknál működnek.
- A dotfile-ok maradjanak tiltva public rootoknál.
Static site példa
[[vhosts]]
name = "docs"
hosts = ["docs.example.com"]
[vhosts.web]
root = "/srv/docs"
index_files = ["index.html"]
deny_dotfiles = true
Fő opciók
| Opció | Használd, amikor |
|---|---|
root | Bounded filesystem root kell public file-okhoz. |
index_files | Egy directory index file-ra resolve-oljon. |
deny_dotfiles | Hidden file-ok soha ne váljanak véletlenül publická. |
directory_listing | Szándékosan repository-style file indexeket publikálsz. |
Repository listing példa
[[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.