aboutsummaryrefslogtreecommitdiff
path: root/gmid.1
diff options
context:
space:
mode:
authorAnna “CyberTailor” <cyber@sysrq.in>2021-07-29 09:13:45 +0500
committerOmar Polo <op@omarpolo.com>2021-07-29 09:35:09 +0200
commite308526cf63d7cbbabaa4bf93bae45a27fb58d4b (patch)
tree01d2a56e683c66b7a8ec52800ee57250f74f5f36 /gmid.1
parente58a447a28a416ee719a9e457bfc8160a9b0e771 (diff)
gmid.1: provide certificate generation example
Diffstat (limited to 'gmid.1')
-rw-r--r--gmid.126
1 files changed, 21 insertions, 5 deletions
diff --git a/gmid.1 b/gmid.1
index 726b0cb..510e599 100644
--- a/gmid.1
+++ b/gmid.1
@@ -646,9 +646,25 @@ $ chmod +x docs/cgi/hello
$ gmid -x '/cgi/*' docs
.Ed
.Pp
+An X.509 certificate must be provided to run
+.Nm
+using a configuration file.
+First, the RSA certificate is created using a wildcard common name:
+.Bd -literal -offset indent
+# openssl genrsa \-out /etc/ssl/private/example.com.key 4096
+# openssl req \-new \-x509 \-key /etc/ssl/private/example.com.key \e
+ \-out /etc/ssl/example.com.crt \-days 36500 \-nodes \-subj "/CN=*.com"
+# chmod 600 /etc/ssl/example.com.crt
+# chmod 600 /etc/ssl/private/example.com.key
+.Ed
+.Pp
+In the example above, a certificate is valid for one hundred years from
+the date it was created, which is normal for TOFU.
+.Pp
The following is an example of a possible configuration for a site
that enables only TLSv1.3, adds a mime type for the file extension
-"rtf" and defines two virtual host:
+.Qq rtf
+and defines two virtual host:
.Bd -literal -offset indent
ipv6 on # enable ipv6
@@ -657,14 +673,14 @@ protocols "tlsv1.3"
map "application/rtf" to-ext "rtf"
server "example.com" {
- cert "/path/to/cert.pem"
- key "/path/to/key.pem"
+ cert "/etc/ssl/example.com.crt"
+ key "/etc/ssl/private/example.com.key"
root "/var/gemini/example.com"
}
server "it.example.com" {
- cert "/path/to/cert.pem"
- key "/path/to/key.pem"
+ cert "/etc/ssl/example.com.crt"
+ key "/etc/ssl/private/example.com.key"
root "/var/gemini/it.example.com"
# enable cgi scripts inside "cgi-bin"