💾 Archived View for 80h.dev › projects › gemserv › files › config.toml.gemini captured on 2020-09-24 at 00:45:35. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
01 port = 1965
02 # use "::" for ipv6 and ipv4 or "0.0.0.0" for ipv4 only
03 host = "::"
04 # log is optional and server wide. It defaults to info if not set. Other levels
05 # are error, warn, and info. If error is set it will only show error. If warn
06 # is set it will show error and warn. Info shows all three.
07 log = "info"
08
09 # There must be at least 1 server tag if a client doesn't send sni the server
10 # will use this tag as its default.
11 # Server 1
12 [[server]]
13 hostname = "example.com"
14 dir = "/path/to/serv"
15 key = "/path/to/key"
16 cert = "/path/to/cert"
17 # index is optional but defaults to index.gemini. The server will serve files
18 # ending in gemini or gmi.
19 index = "index.gmi"
20 # lang is optional
21 lang = "en"
22 # cgi is optional bool
23 cgi = true
24 # cgipath is optional and only checked if cgi is true. It restricts cgi to only
25 # this directory.
26 cgipath = "/path/to/cgi-bin/"
27 # scgi is optional
28 scgi = { "/scgi" = "localhost:4000" }
29 # cgienv is optional
30 cgienv = { "GIT_PROJECT_ROOT" = "/srv/git" }
31 # usrdir is optional. it'll look in /home/usr/public_gemini
32 usrdir = true
33 # proxy is optional
34 # path is what comes after the hostname e.g. example.com/path
35 proxy = { path = "localhost:1966" }
36 # proxy_all is optional
37 # It will send all requests to the specified server. It also supports streamming.
38 proxy_all = localhost:1967
39 # redirect is optional
40 redirect = { "/redirect" = "/", "/newdomain" = "gemini://example.net" }
41
42 # Server 2
43 [[server]]
44 hostname = "example.net"
45 dir = "/path/to/serv/"
46 key = "/path/to/key"
47 cert = "/path/to/cert"