静的サイト

HTML、CSS、images、downloadsをdiskから直接配信します。これはFluxheimの最も単純なmodeです。

使う場面

documentation、product pages、downloads、requestごとのapplication codeが不要なsiteにはstatic hostingを使います。

  • ETagとconditional requestsはrepeat trafficを減らします。
  • 大きなfilesにはbyte rangesが使えます。
  • public rootsではdotfilesを拒否したままにします。

static site例

[[vhosts]]
name = "docs"
hosts = ["docs.example.com"]

[vhosts.web]
root = "/srv/docs"
index_files = ["index.html"]
deny_dotfiles = true

主なoptions

option使う場面
rootpublic files向けにbounded filesystem rootが必要な場合。
index_filesdirectoryをindex fileへ解決したい場合。
deny_dotfileshidden filesが誤ってpublicになってはいけない場合。
directory_listingrepository-style file indexesを意図して公開する場合。

repository listing例

[[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.

日本語