~int80h/gemserv

ref: 0afdf8075f0a4c42777e465037fca56de00f8478 gemserv/config.toml -rw-r--r-- 1.5 KiB
0afdf807int 80h Changed hostname check to be case insensitive 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
port = 1965
# use "::" for ipv6 and ipv4 or "0.0.0.0" for ipv4 only
host = "::"
# log is optional and server wide. It defaults to info if not set. Other levels
# are error, warn, and info. If error is set it will only show error. If warn
# is set it will show error and warn. Info shows all three.
log = "info"

# There must be at least 1 server tag if a client doesn't send sni the server
# will use this tag as its default.
# Server 1
[[server]]
hostname = "example.com"
dir = "/path/to/serv"
key = "/path/to/key"
cert = "/path/to/cert"
# 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" }
# usrdir is optional. it'll look in each user's ~/public_gemini
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.
proxy_all = "localhost:1967"
# redirect is optional
redirect = { "/redirect" = "/", "/newdomain" = "gemini://example.net" }

# Server 2
[[server]]
hostname = "example.net"
dir = "/path/to/serv/"
key = "/path/to/key"
cert = "/path/to/cert"