twins-upstream/CONFIGURATION.md
2020-10-30 11:19:16 -07:00

977 B

Paths may be defined as fixed strings or regular expressions (starting with ^).

Fixed string paths will match with and without a trailing slash.

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.

When accessing a directory index.gemini or index.gmi is served.

config.yaml

# Hostname and port to listen for connections on
hostname: gemini.rocks
port: 1965

# Path to certificate and private key
cert: /home/twins/data/certfile.crt
key: /home/twins/data/keyfile.key


# Server paths
serve:
  -
    path: /sites
    root: /home/twins/data/sites
  -
    path: ^/(help|info)$
    root: /home/twins/data/help
  -
    path: ^/proxy-example$
    proxy: gemini://localhost:1966
  -
    path: ^/cmd-example$
    command: uname -a
  -
    path: /
    root: /home/twins/data/home