Uruchom Fluxheim
Użyj tej strony, gdy chcesz szybko uruchomić lokalny server. Utrzymuje config mały i sprawdza go przed obsługą traffic.
Instalacja a release binary
curl -L https://github.com/valkyoth/fluxheim/releases/download/v1.6.30/fluxheim-1.6.30-full-x86_64-linux.tar.gz -o fluxheim.tar.gz
tar -xzf fluxheim.tar.gz
sudo install -m 0755 fluxheim /usr/local/bin/fluxheim
Minimalna strona statyczna
[server]
listen = ["0.0.0.0:8080"]
default_vhost = "site"
[[vhosts]]
name = "site"
hosts = ["example.com"]
[vhosts.web]
root = "/srv/example"
index_files = ["index.html"]
deny_dotfiles = true
Co robi pierwszy config
| Opcja | Cel |
|---|---|
server.listen | Kontroluje plain HTTP socket otwierany przez Fluxheim. |
server.default_vhost | Wybiera fallback site, gdy żaden host nie pasuje. |
vhosts.hosts | Lista hostname akceptowanych przez site. |
vhosts.web.root | Wskazuje directory serwowane odwiedzającym. |
Sprawdź i uruchom
fluxheim --config /etc/fluxheim/fluxheim.toml --check-config
fluxheim --config /etc/fluxheim/fluxheim.toml
Użyj config check w deployment scripts. Łapie nieznane pola, unsafe paths, nieważne listeners i feature/config mismatches, zanim traffic zostanie przeniesiony.
Następne przydatne wybory
- Dodaj TLS dopiero po tym, jak DNS wskazuje host.
- Add cache only for routes that are safe to share between visitors.
- Add metrics only when the listener is private or behind a trusted proxy.