Server
When a web server is started using the --config
option of the server
command these options are available at the top-level of the TOML file.
listen
IP address to bind to (default0.0.0.0
)port
Port for the HTTP server (default8888
)redirect-insecure
Redirect HTTP to HTTPS (optional, defaulttrue
)
The redirect-secure
option only applies when a SSL server is configured.
SSL
To configure an SSL server use the [[ssl]]
table:
cert
Path to the SSL certificate file (required)key
Path to the SSL key file (required)port
Port for the SSL server (required)
The SSL certificate should include Subject Alternative Names for each virtual host name or use a wildcard for subdomains, eg: *.example.com
.
Hosts
Virtual hosts defined in a [[host]]
table support these fields:
name
Name of the virtual host (required)directory
Path to the directory for static files (required)log
Log server requests (optional, defaultfalse
)require-index
Require anindex.html
file indirectory
(optional, defaulttrue
)disable-cache
Send headers to clients to disable caching (optional, defaultfalse
)deny-iframe
Add a header to prevent the embedding in iframes (optional, defaulttrue
)
If directory
is a relative path it is resolved using the parent folder of the configuration file.