twins/CONFIGURATION.md

54 lines
1.3 KiB
Markdown
Raw Normal View History

Paths may be defined as fixed strings or regular expressions (starting with `^`).
Fixed string paths will match with and without a trailing slash.
2020-10-30 00:17:23 +00:00
Serve entries have either a `root` path or `proxy` URL. When a `root` path is
provided static files and directories are served from that location. When a
`proxy` URL is provided requests are forwarded to the Gemini server at that URL.
Paths are matched in the order they are provided.
2020-10-30 00:17:23 +00:00
When accessing a directory `index.gemini` or `index.gmi` is served.
2020-10-29 20:35:48 +00:00
# config.yaml
```yaml
# Address to listen on
listen: 0.0.0.0:1965
# TLS certificates
certificates:
2020-10-29 20:35:48 +00:00
-
cert: /home/gemini.rocks/data/cert.crt
key: /home/gemini.rocks/data/cert.key
# Hosts and paths to serve
hosts:
-
name: gemini.rocks
paths:
-
path: /sites
root: /home/gemini.rocks/data/sites
-
path: ^/(help|info)$
root: /home/gemini.rocks/data/help
-
path: ^/proxy-example$
proxy: gemini://localhost:1966
-
path: ^/cmd-example$
command: uname -a
-
path: /
root: /home/gemini.rocks/data/home
2020-10-29 20:35:48 +00:00
-
name: twins.rocketnine.space
paths:
-
path: /sites
root: /home/twins/data/sites
-
path: /
root: /home/twins/data/home
2020-10-29 20:35:48 +00:00
```