Fluxheim/문서/configuration Basics

configuration Basics

Fluxheim은 TOML을 사용합니다. 알 수 없는 field는 거부되므로 철자 실수는 restart 전에 실패합니다.

기본 형태

[server]
listen = ["0.0.0.0:8080"]
default_vhost = "site"

[[vhosts]]
name = "site"
hosts = ["example.com"]

config 구성 방식

영역포함되는 것
serverListeners, global limits, trusted proxy handling, and redirects.
tlsglobal TLS backend 및 compatibility policy.
cacheProcess-wide cache defaults and storage tiers.
vhostsHostnames, routes, web roots, proxy settings, PHP, TLS, and access policy.
metrics운영 가시성을 위한 Prometheus 및 export listener.

route 형태

[[vhosts.routes]]
name = "app"
path_prefix = "/app/"
methods = ["GET", "HEAD", "POST"]
max_request_body_bytes = "16MiB"

[vhosts.routes.proxy]
upstreams = ["127.0.0.1:3000"]

route에는 matcher 하나와 action 하나가 있습니다. exact path가 먼저 이기고, 그다음 longest prefix, regex support가 켜진 경우 regex route, 마지막으로 fallback route가 적용됩니다.

안전한 습관

  • 실행 fluxheim --check-config reload 전에.
  • site 또는 application boundary마다 하나의 vhost를 사용하세요.
  • secret은 public docs가 아니라 file, environment, container secret에 보관하세요.
  • upload와 비용이 큰 application path에는 route-level limit을 사용하세요.
  • admin 및 metrics listener는 private로 유지하세요.
한국어