aboutsummaryrefslogtreecommitdiff
path: root/gmid.conf.5
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-09-08 21:15:02 +0000
committerOmar Polo <op@omarpolo.com>2022-09-08 21:15:02 +0000
commit9b15e4c62807eda8a248e6df7ac0603a6b9331cc (patch)
tree6d184d355d58745e1af5c6510d6b18f671f7ef63 /gmid.conf.5
parent7f03b52bd61e64f2627fa0891582f981cc215e0d (diff)
move gmid to the eight section of the manual
Diffstat (limited to 'gmid.conf.5')
-rw-r--r--gmid.conf.5213
1 files changed, 70 insertions, 143 deletions
diff --git a/gmid.conf.5 b/gmid.conf.5
index cbd16fd..59e6953 100644
--- a/gmid.conf.5
+++ b/gmid.conf.5
@@ -11,7 +11,7 @@
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd $Mdocdate: April 7 2022$
+.Dd September 8, 2022
.Dt GMID.CONF 5
.Os
.Sh NAME
@@ -20,7 +20,7 @@
.Sh DESCRIPTION
.Nm
is the configuration file format for the
-.Xr gmid 1
+.Xr gmid 8
Gemini server.
.Pp
The configuration file is divided into three sections:
@@ -209,24 +209,79 @@ Path to the certificate to use for this server.
.Ar file
should contain a PEM encoded certificate.
This option is mandatory.
-.It Ic cgi Ar path
-Execute
-.Sx CGI
-scripts that matches
+.It Ic default type Ar string
+Set the default media type that is used if the media type for a
+specified extension is not found.
+If not specified, the
+.Ic default type
+is set to
+.Dq application/octet-stream .
+.It Ic fastcgi Oo Ic tcp Oc Ar socket Oo Cm port Ar port Oc
+Enable
+.Sx FastCGI
+instead of serving files.
+The
+.Ar socket
+can either be a UNIX-domain socket or a TCP socket.
+If the FastCGI application is listening on a UNIX domain socket,
+.Ar socket
+is a local path name within the
+.Xr chroot 2
+root directory of
+.Nm .
+Otherwise, the
+.Ic tcp
+keyword must be provided and
+.Ar socket
+is interpreted as a hostname or an IP address.
+.Ar port
+can be either a port number or the name of a service enclosed in
+double quotes.
+If not specified defaults to 9000.
+.It Ic index Ar string
+Set the directory index file.
+If not specified, it defaults to
+.Pa index.gmi .
+.It Ic key Ar file
+Specify the private key to use for this server.
+.Ar file
+should contain a PEM encoded private key.
+This option is mandatory.
+.It Ic lang Ar string
+Specify the language tag for the text/gemini content served.
+If not specified, no
+.Dq lang
+parameter will be added in the response.
+.It Ic location Ar path Brq ...
+Specify server configuration rules for a specific location.
.Ar path
-using shell globbing rules.
-.Pp
-The CGI scripts are executed in the directory they reside and inherit
-the environment from
-.Nm gmid
-with these additional variables set:
+argument will be matched against the request path with shell globbing
+rules.
+In case of multiple location statements in the same context, the first
+matching location will be put into effect and the later ones ignored.
+Therefore is advisable to match for more specific paths first and for
+generic ones later on.
+A
+.Ic location
+section may include most of the server configuration rules
+except
+.Ic alias , Ic cert , Ic key , Ic location , Ic param No and Ic proxy .
+.It Ic log Ar bool
+Enable or disable the logging for the current server or location block.
+.It Ic param Ar name Cm = Ar value
+Set the param
+.Ar name
+to
+.Ar value
+for FastCGI.
+By default the following parameters are defined:
.Bl -tag -width 24m
.It Ev GATEWAY_INTERFACE
.Dq CGI/1.1
.It Ev GEMINI_DOCUMENT_ROOT
The root directory of the virtual host.
.It Ev GEMINI_SCRIPT_FILENAME
-Full path to the CGI script being executed.
+Full path to the FastCGI script being executed.
.It Ev GEMINI_URL
The full IRI of the request.
.It Ev GEMINI_URL_PATH
@@ -253,9 +308,7 @@ Textual representation of the client IP.
This is present only for RFC3875 (CGI) compliance.
It's always set to the empty string.
.It Ev SCRIPT_NAME
-The part of the
-.Ev GEMINI_URL_PATH
-that identifies the current CGI script.
+The virtual URI path to the script.
.It Ev SERVER_NAME
The name of the server
.It Ev SERVER_PORT
@@ -292,129 +345,6 @@ certificate in the ISO 8601 format
The time corresponding to the start of the validity period of the peer
certificate in the ISO 8601 format.
.El
-.It Ic default type Ar string
-Set the default media type that is used if the media type for a
-specified extension is not found.
-If not specified, the
-.Ic default type
-is set to
-.Dq application/octet-stream .
-.It Ic entrypoint Ar path
-Handle all the requests for the current virtual host using the
-.Sx CGI
-script at
-.Ar path ,
-relative to the current document root.
-.It Ic env Ar name Cm = Ar value
-Set the environment variable
-.Ar name
-to
-.Ar value
-when executing CGI scripts.
-Can be provided more than once.
-.\" don't document the "spawn <prog>" form because it probably won't
-.\" be kept.
-.It Ic fastcgi Oo Ic tcp Oc Ar socket Oo Cm port Ar port Oc
-Enable
-.Sx FastCGI
-instead of serving files.
-The
-.Ar socket
-can either be a UNIX-domain socket or a TCP socket.
-If the FastCGI application is listening on a UNIX domain socket,
-.Ar socket
-is a local path name within the
-.Xr chroot 2
-root directory of
-.Nm .
-Otherwise, the
-.Ic tcp
-keyword must be provided and
-.Ar socket
-is interpreted as a hostname or an IP address.
-.Ar port
-can be either a port number or the name of a service enclosed in
-double quotes.
-If not specified defaults to 9000.
-.It Ic index Ar string
-Set the directory index file.
-If not specified, it defaults to
-.Pa index.gmi .
-.It Ic key Ar file
-Specify the private key to use for this server.
-.Ar file
-should contain a PEM encoded private key.
-This option is mandatory.
-.It Ic lang Ar string
-Specify the language tag for the text/gemini content served.
-If not specified, no
-.Dq lang
-parameter will be added in the response.
-.It Ic location Ar path Brq ...
-Specify server configuration rules for a specific location.
-.Ar path
-argument will be matched against the request path with shell globbing
-rules.
-In case of multiple location statements in the same context, the first
-matching location will be put into effect and the later ones ignored.
-Therefore is advisable to match for more specific paths first and for
-generic ones later on.
-A
-.Ic location
-section may include most of the server configuration rules
-except
-.Ic alias , Ic cert , Ic cgi , Ic entrypoint , Ic env , Ic key ,
-.Ic location , Ic param No and Ic proxy .
-.It Ic log Ar bool
-Enable or disable the logging for the current server or location block.
-.It Ic param Ar name Cm = Ar value
-Set the param
-.Ar name
-to
-.Ar value
-for FastCGI.
-By default the following variables
-.Pq parameters
-are sent, and carry the same semantics as with CGI:
-.Pp
-.Bl -bullet -compact
-.It
-GATEWAY_INTERFACE
-.It
-GEMINI_URL_PATH
-.It
-QUERY_STRING
-.It
-REMOTE_ADDR
-.It
-REMOTE_HOST
-.It
-REQUEST_METHOD
-.It
-SERVER_NAME
-.It
-SERVER_PROTOCOL
-.It
-SERVER_SOFTWARE
-.It
-AUTH_TYPE
-.It
-REMOTE_USER
-.It
-TLS_CLIENT_ISSUER
-.It
-TLS_CLIENT_HASH
-.It
-TLS_VERSION
-.It
-TLS_CIPHER
-.It
-TLS_CIPHER_STRENGTH
-.It
-TLS_CLIENT_NOT_BEFORE
-.It
-TLS_CLIENT_NOT_AFTER
-.El
.It Ic ocsp Ar file
Specify an OCSP response to be stapled during TLS handshakes
with this server.
@@ -588,9 +518,6 @@ server "example.it" {
key "/etc/ssl/private/example.it.key"
root "/var/gemini/example.it"
- # execute cgi scripts inside "cgi-bin"
- cgi "/cgi-bin/*"
-
# set the language for text/gemini files
lang "it"
}
@@ -623,7 +550,7 @@ server "example.com" {
}
.Ed
.Sh SEE ALSO
-.Xr gmid 1 ,
+.Xr gmid 8 ,
.Xr slowcgi 8
.Sh AUTHORS
.An -nosplit