Fluxheim/Dokumentācija/Palaid Fluxheim

Palaid Fluxheim

Izmanto šo lapu, ja ātri vajadzīgs lokāls serveris. Tā patur config mazu un pārbauda to pirms traffic servēšanas.

Instalēt

Pirms arhīva izvilkšanas pārbaudiet publicēto SHA-256 kontrolsummu.

Linux x86_64

VERSION="1.8.2"
ARCHIVE="fluxheim-${VERSION}-full-x86_64-linux.tar.gz"
BASE_URL="https://github.com/valkyoth/fluxheim/releases/download/v${VERSION}"
curl -fLO "${BASE_URL}/${ARCHIVE}"
echo "1a323dcd5632e25acf2e4463e549f20cdd3d568f445f9d923b1be312ec7f9839  ${ARCHIVE}" | sha256sum -c -
tar -xzf "$ARCHIVE"
sudo install -m 0755 "fluxheim-${VERSION}-full-x86_64-linux/fluxheim" /usr/local/bin/fluxheim

macOS Apple Silicon

VERSION="1.8.2"
ARCHIVE="fluxheim-${VERSION}-full-aarch64-macos.tar.gz"
BASE_URL="https://github.com/valkyoth/fluxheim/releases/download/v${VERSION}"
curl -fLO "${BASE_URL}/${ARCHIVE}"
echo "a725ebcccac259af6640da57ce12e7a3944c5bd0d9e7869d4001196a0c394031  ${ARCHIVE}" | shasum -a 256 -c -
tar -xzf "$ARCHIVE"
install -d "$HOME/.local/bin"
install -m 0755 "fluxheim-${VERSION}-full-aarch64-macos/fluxheim" "$HOME/.local/bin/fluxheim"

Šis ir neparakstīts komandrindas priekšskatījums. Atstājiet iespējotu Gatekeeper; Developer ID parakstīšana, notariāla apstiprināšana un launchd integrācija vēl netiek nodrošināta.

Windows x86_64

$Version = "1.8.2"
$Archive = "fluxheim-$Version-full-x86_64-windows.zip"
$BaseUrl = "https://github.com/valkyoth/fluxheim/releases/download/v$Version"
Invoke-WebRequest "$BaseUrl/$Archive" -OutFile $Archive
$Expected = "a72b84720083406f318bf3fc87555eb62fd76dbd1506dbf2cd368e7364726b44"
if ((Get-FileHash $Archive -Algorithm SHA256).Hash.ToLowerInvariant() -cne $Expected) { throw "Archive checksum verification failed" }
Expand-Archive -LiteralPath $Archive -DestinationPath "$env:LOCALAPPDATA\Fluxheim" -Force

Šis ir neparakstīts portatīvs priekšskatījums. Atstājiet iespējotu SmartScreen un PowerShell drošību; Authenticode parakstīšana un Windows pakalpojuma instalētājs vēl netiek nodrošināts.

Pārvaldīta PHP-FPM uzraudzība ir pieejama tikai Unix; Windows atbalsta ārējus TCP FastCGI pūlus.

Minimāla statiska vietne

[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

Ko dara pirmais config

OpcijaMērķis
server.listenKontrolē plain HTTP socket, ko Fluxheim atver.
server.default_vhostIzvēlas fallback vietni, ja neviens host nesakrīt.
vhosts.hostsUzskaita hostnames, ko vietne pieņem.
vhosts.web.rootNorāda direktoriju, ko servē apmeklētājiem.

Pārbaudīt un startēt

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

Izmanto config check deployment skriptos. Tas noķer nezināmus laukus, nedrošus pathus, nederīgus listenerus un feature/config neatbilstības pirms traffic pārvietošanas.

Nākamās noderīgās izvēles

  • Pievieno TLS tikai pēc tam, kad DNS norāda uz hostu.
  • 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.
Latviešu