Expand description
TOML configuration loading.
A ServerConfig mirrors the TOML file the CLI accepts. It can also be
turned directly into a runnable Server when a runtime
feature is enabled.
listen = "0.0.0.0:8080" # or ["127.0.0.1:8080", "[::1]:8080"]
root = "/var/www" # document root for static file serving
server_name = "httpsd"
workers = 8
[tls]
cert = "cert.pem" # PEM chain (leaf first)
key = "key.pem" # PEM private key
# self_signed = ["localhost"] # alternatively, generate an ephemeral cert
[compress]
enabled = true
min_size = 256Structs§
- Acme
File Config - Automatic-certificate (ACME) settings.
- Compress
Config - Compression settings.
- Hsts
Config Strict-Transport-Securitysettings.- Priv
Drop Config - Privilege-dropping settings (drop root after binding; Unix only).
- Server
Config - The parsed server configuration.
- TlsConfig
- TLS settings.