Fluxheim/文档/运行 Fluxheim

运行 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.
简体中文