Fluxheim 실행하기
로컬 서버를 빠르게 띄우고 싶을 때 이 페이지를 사용하세요. 설정을 작게 유지하고 트래픽을 받기 전에 검증합니다.
설치 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
최소 정적 사이트
[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
첫 config가 하는 일
| 옵션 | 목적 |
|---|---|
server.listen | Fluxheim이 여는 plain HTTP socket을 제어합니다. |
server.default_vhost | host가 match되지 않을 때 fallback site를 선택합니다. |
vhosts.hosts | site가 허용하는 hostname 목록입니다. |
vhosts.web.root | 방문자에게 제공되는 directory를 가리킵니다. |
확인 후 시작
fluxheim --config /etc/fluxheim/fluxheim.toml --check-config
fluxheim --config /etc/fluxheim/fluxheim.toml
deployment script에서 config check를 사용하세요. traffic을 이동하기 전에 unknown field, unsafe path, invalid listener, feature/config mismatch를 잡습니다.
다음 유용한 선택
- 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.