Fluxheim/Documentos/Pôr o Fluxheim a funcionar

Pôr o Fluxheim a funcionar

Use esta página quando quiser um servidor local rapidamente. Mantém a config pequena e verifica-a antes de servir tráfego.

Instalar 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

Site estático mínimo

[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

O que a primeira config faz

OpçãoFinalidade
server.listenControlo operacionalo operacionala o socket HTTP plain que o Fluxheim abre.
server.default_vhostSeleciona o site fallback quando nenhum host corresponde.
vhosts.hostsLista os hostnames aceites pelo site.
vhosts.web.rootAponta para o diretório servido aos visitantes.

Verificar e iniciar

fluxheim --config /etc/fluxheim/fluxheim.toml --check-config
fluxheim --config /etc/fluxheim/fluxheim.toml

Use config check em scripts de deployment. Apanha campos desconhecidos, paths inseguros, listeners inválidos e desalinhamentos feature/config antes de mover tráfego.

Próximas escolhas úteis

  • Adicione TLS apenas depois de o DNS apontar para o 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.
Português