|
|
# `rsweb` configuration
|
|
|
## Basics
|
|
|
`rsweb` is configured using a `toml` config file. By default
|
|
|
`rsweb` looks in `/etc/rsweb/rsweb.config.toml`. If launched with a commandline option it also accepts other paths as config files.
|
|
|
## Layout
|
|
|
`rsweb` has three main sections. An unnamed one, `ssl` and `ressources`.
|
|
|
An example might look like this:
|
|
|
```toml
|
|
|
port = 8080
|
|
|
ip = "127.0.0.1"
|
|
|
threads = 10
|
|
|
[resources]
|
|
|
root = "."
|
|
|
index = "/test.html"
|
|
|
aliases = ["/test:/test.html"]
|
|
|
[ssl]
|
|
|
private_key = "privkey.pem"
|
|
|
certificate_chain = "certs.pem"
|
|
|
```
|
|
|
## Top level or unnamed section
|
|
|
- `port` (integer) (required): the port to use
|
|
|
- `ip` (string) (required): the ip address to bind to
|
|
|
- `threads` (integer): the amount of threads to use for the server
|
|
|
- `logfile` (string): the logfile to log to
|
|
|
- `resource_cache` (boolean): whether or not `rsweb` should cache resources
|
|
|
- `cache_capacity` (integer): the capacity of the cache
|
|
|
## `resources`
|
|
|
- `root` (string) (required): the root from where all resources are grabbed
|
|
|
- `index` (string): the index page location relative to the resource root (note that it has to be written with a leading `/` which may be confusing)
|
|
|
- `routes` (array of strings): locations that should be routed (formatted like: `"<location>:<route_location>"`. note `location` and `route_location` are relative to the resource root but still written with a leading `/`)
|
|
|
- `aliases` (array of strings): locations that should be aliased (formatted like: `"<location>:<actual_location>"`. note `location` and `actual_location` are relative to the resource root
|
|
|
## `ssl`
|
|
|
- `private_key` (string) (required): the private key file to use
|
|
|
- `certificate_chain` (string) (required): the certificate chain file to use |
|
|
\ No newline at end of file |