1 .\" Copyright (c) 2020 Omar Polo <op@omarpolo.com>
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd $Mdocdate: October 2 2020$
19 .Nd dead simple gemini server
30 is a very simple and minimal gemini server.
31 It only supports serving static content, and strive to be as simple as
35 will strip any sequence of
39 in the requests made by clients, so it's impossible to serve content
43 Furthermore, on OpenBSD,
47 are used to ensure that
49 dosen't do anything else than read files from the given directory and
50 accept network connections.
52 It should be noted that
54 is very simple in its implementation, and so it may not be appropriate
55 for serving site with lots of users.
56 After all, the code is single threaded and use a single process.
58 The options are as follows:
61 The certificate to use, by default is
64 The root directory to serve.
66 won't serve any file that is outside that directory.
68 Print the usage and exit
70 The key for the certificate, by default is
74 To quickly getting started
76 $ # generate a cert and a key
77 $ openssl req -x509 -newkey rsa:4096 -keyout key.pem \\
78 -out cert.pem -days 365 -nodes
80 $ cat <<EOF > docs/index.gmi
84 $ gmid -c cert.pem -k key.pem -d docs
87 now you can visit gemini://localhost/ with your preferred gemini client.
91 it doesn't support virtual host: the host part of the request URL is
94 it doesn't fork in the background or anything like that.