1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Example httpsd configuration. Run with: httpsd -c samples/config.toml
# One address, or a list: listen = ["127.0.0.1:8080", "[::1]:8080"]
= "127.0.0.1:8080"
# Directory to serve static files from.
= "./public"
# Optional: the value sent in the `Server` response header.
= "httpsd"
# Optional: worker thread count (thread-pool runtime). Defaults to CPU count.
# workers = 8
# Uncomment to enable HTTPS with a real certificate:
# [tls]
# cert = "cert.pem" # PEM chain, leaf first
# key = "key.pem" # PEM private key (PKCS#8, PKCS#1 RSA, or SEC1 EC)
# ...or generate an ephemeral self-signed cert for local development:
# [tls]
# self_signed = ["localhost"]
[]
= true
= 256
# Strict-Transport-Security, sent only on HTTPS responses.
# [hsts]
# max_age = 31536000
# include_subdomains = false
# preload = false
# Plain-HTTP listener: redirects to HTTPS and serves ACME HTTP-01 challenges.
# http_listen = "0.0.0.0:80"
# Serve content over HTTP instead of redirecting (off by default):
# allow_http = false
# Automatic certificates via ACME (e.g. Let's Encrypt). Requires accept_tos.
# [acme]
# accept_tos = true
# email = "you@example.com"
# staging = true # use Let's Encrypt staging while testing
# directory = "https://acme-v02.api.letsencrypt.org/directory" # any ACME CA
# host_whitelist = ["example.com", "www.example.com"]
# cert_dir = "/var/lib/httpsd"