4 **gmid** - dead simple zero configuration gemini server
10 \[**-c** *cert.pem*]
12 \[**-k** *key.pem*]
17 is a very simple and minimal gemini server.
18 It only supports serving static content, and strive to be as simple as
22 will strip any sequence of
26 in the requests made by clients, so it's impossible to serve content
29 directory by mistake, and will also refuse to follow symlink.
35 are used to ensure that
37 dosen't do anything else than read files from the given directory and
38 accept network connections.
40 It should be noted that
42 is very simple in its implementation, and so it may not be appropriate
43 for serving site with lots of users.
44 After all, the code is single threaded and use a single process.
46 If a user request path is a directory,
50 file inside that directory.
51 If not found, it will return an error 51 (not found) to the user.
53 The options are as follows:
57 > The certificate to use, by default is
62 > The root directory to serve.
64 > won't serve any file that is outside that directory.
68 > Print the usage and exit.
72 > The key for the certificate, by default is
77 To quickly getting started
79 $ # generate a cert and a key
80 $ openssl req -x509 -newkey rsa:4096 -keyout key.pem \
81 -out cert.pem -days 365 -nodes
83 $ cat <<EOF > docs/index.gmi
87 $ gmid -c cert.pem -k key.pem -d docs
89 now you can visit gemini://localhost/ with your preferred gemini client.
93 * it doesn't support virtual hosts: the host part of the request URL is
96 * it doesn't fork in the background or anything like that.