|GMID(1)||General Commands Manual||GMID(1)|
gmid — simple and
secure Gemini server
gmid is a simple and minimal gemini server
that can serve static files, execute CGI scripts and talk to FastCGI
applications. It can run without a configuration file with a limited set of
gmid rereads the configuration file when
The options are as follows:
gmidwill refuse to start.
If no configuration file is given,
runs in “config-less mode” (i.e. runs in the foreground to
serve a directory from the shell) and looks for the following options
-doption. They have the form hostname.cert.pem and hostname.key.pem. If a certificate or a key doesn't exist for a given hostname, they will be generated automatically.
-voptions increase the verbosity.
cgioption in the ‘Servers’ section below to learn how path is processed. Cannot be provided more than once.
Requests are logged with the
severity. Each request log entry has the following fields, separated by
Serve the current directory
$ gmid .
To serve the directory docs and enable CGI scripts inside docs/cgi
$ mkdir docs/cgi $ cat <<EOF > docs/cgi/hello #!/bin/sh printf "20 text/plain\r\n" echo "hello world" EOF $ chmod +x docs/cgi/hello $ gmid -x '/cgi/*' docs
gmid as a deamon a configuration
file and a X.509 certificate must be provided. A self-signed certificate,
which are commonly used in the Geminispace, can be generated using for e.g.
# openssl req -x509 -newkey rsa:4096 -nodes \ -keyout /etc/ssl/private/example.com.key \ -out /etc/ssl/example.com.pem \ -days 365 -subj "/CN=example.com" # chmod 600 /etc/ssl/example.com.crt # chmod 600 /etc/ssl/private/example.com.key
gmid can be started with
# gmid -c /etc/gmid.conf
gmid uses the “Flexible and
Economical” UTF-8 decoder written by Bjoern
gmid program was written by
gmidwon't be able to serve files inside that directory until a restart. This restriction only applies to the root directories and not their content.
|April 7, 2022||OpenBSD 7.1|