2022-05-07 23:13:33 +02:00
|
|
|
Please note that Gemserv uses the TCP port 1965, so you can't use it for anything else.
|
2021-07-10 17:25:49 +02:00
|
|
|
|
2022-05-07 23:13:33 +02:00
|
|
|
To add a gemini capsule, create a `/etc/gemserv/config.d/example.toml` file as following:
|
|
|
|
|
|
|
|
``` toml
|
2021-07-10 17:25:49 +02:00
|
|
|
[[server]]
|
2022-05-07 23:13:33 +02:00
|
|
|
hostname = "yourdomain.org"
|
|
|
|
dir = "/path/to/serv"
|
|
|
|
key = "/etc/yunohost/certs/yourdomain.org/key.pem"
|
|
|
|
cert = "/etc/yunohost/certs/yourdomain.org/crt.pem"
|
2021-07-10 17:25:49 +02:00
|
|
|
# index is optional but defaults to index.gemini. The server will serve files
|
|
|
|
# ending in gemini or gmi.
|
|
|
|
index = "index.gmi"
|
|
|
|
# lang is optional
|
|
|
|
lang = "en"
|
|
|
|
# cgi is optional bool
|
|
|
|
cgi = true
|
|
|
|
# cgipath is optional and only checked if cgi is true. It restricts cgi to only
|
|
|
|
# this directory.
|
|
|
|
cgipath = "/path/to/cgi-bin/"
|
|
|
|
# scgi is optional
|
|
|
|
scgi = { "/scgi" = "localhost:4000" }
|
|
|
|
# cgienv is optional
|
|
|
|
cgienv = { "GIT_PROJECT_ROOT" = "/srv/git" }
|
2022-05-07 23:17:35 +02:00
|
|
|
# usrdir is optional. it'll look in each user's ~/public_gemini
|
2021-07-10 17:25:49 +02:00
|
|
|
usrdir = true
|
|
|
|
# proxy is optional
|
|
|
|
# path is what comes after the hostname e.g. example.com/path
|
|
|
|
proxy = { path = "localhost:1966" }
|
|
|
|
# proxy_all is optional
|
|
|
|
# It will send all requests to the specified server. It also supports streamming.
|
2022-05-07 23:17:35 +02:00
|
|
|
proxy_all = "localhost:1967"
|
2021-07-10 17:25:49 +02:00
|
|
|
# redirect is optional
|
|
|
|
redirect = { "/redirect" = "/", "/newdomain" = "gemini://example.net" }
|
2022-05-07 23:13:33 +02:00
|
|
|
```
|