Fluxheim/Dokumentáció/Statikus site-ok

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
rootBounded filesystem root kell public file-okhoz.
index_filesEgy directory index file-ra resolve-oljon.
deny_dotfilesHidden file-ok soha ne váljanak véletlenül publická.
directory_listingSzá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.

Magyar