執行 Fluxheim
當你想快速啟動本地伺服器時使用此頁。它保持設定簡短,並在服務流量前進行檢查。
安裝
解壓縮前請驗證已發布的 SHA-256 總和檢查碼。
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"
這是未簽署的命令列預覽版。請保持 Gatekeeper 啟用;目前尚未提供 Developer ID 簽署、公證與 launchd 整合。
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
這是未簽署的可攜式預覽版。請保持 SmartScreen 與 PowerShell 安全功能啟用;目前尚未提供 Authenticode 簽署與 Windows 服務安裝程式。
受管理的 PHP-FPM 程序監督僅適用於 Unix;Windows 支援外部 TCP FastCGI 集區。
最小靜態站點
[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
第一個設定做什麼
| 選項 | 目的 |
|---|---|
server.listen | 控制 Fluxheim 開啟的 plain HTTP socket。 |
server.default_vhost | 當沒有 host 匹配時選擇 fallback site。 |
vhosts.hosts | 列出站點接受的 hostnames。 |
vhosts.web.root | 指向提供給訪客的目錄。 |
檢查並啟動
fluxheim --config /etc/fluxheim/fluxheim.toml --check-config
fluxheim --config /etc/fluxheim/fluxheim.toml
在部署指令碼中使用 config check。它會在切換流量前發現未知欄位、不安全路徑、無效 listener 和 feature/config 不匹配。
下一步有用選擇
- 只有在 DNS 指向 host 後再新增 TLS。
- 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.