aboutsummaryrefslogtreecommitdiff
path: root/gmid.1
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-02-06 18:50:42 +0000
committerOmar Polo <op@omarpolo.com>2021-02-06 18:50:42 +0000
commit2b92a4477a693e92320edf6bdebf6fae81a73091 (patch)
treecffb2766c610d9044dc689270731a4a0ff78b469 /gmid.1
parent3704b36bda0751644c9596594f5fddeb011e4c89 (diff)
reorder stuff
Diffstat (limited to 'gmid.1')
-rw-r--r--gmid.1150
1 files changed, 75 insertions, 75 deletions
diff --git a/gmid.1 b/gmid.1
index 7e96b44..a7179ef 100644
--- a/gmid.1
+++ b/gmid.1
@@ -123,27 +123,6 @@ A string is a sequence of characters wrapped in double quotes,
.Dq like this .
.Ss Global Options
.Bl -tag -width 12m
-.It Ic ipv6 Ar bool
-Enable or disable IPv6 support.
-By default is off.
-.It Ic port Ar portno
-The port to listen on.
-By default is 1965.
-.It Ic protocols Ar string
-Specify the TLS protocols to enable.
-Refer to
-.Xr tls_config_parse_protocols 3
-for the valid protocol string values.
-By default, both TLSv1.3 and TLSv1.2 are enabled.
-Use
-.Dq tlsv1.3
-to enable only TLSv1.3.
-.It Ic mime Ar mime-type Ar file-extension
-Add a mapping for the given
-.Ar file-extension
-to the given
-.Ar mime-type .
-Both argument are strings.
.It Ic chroot Pa path
.Xr chroot 2
the process to the given
@@ -159,6 +138,27 @@ It's recommended to keep the TLS keys outside the chroot.
Future version of
.Nm
may require this.
+.It Ic ipv6 Ar bool
+Enable or disable IPv6 support.
+By default is off.
+.It Ic mime Ar mime-type Ar file-extension
+Add a mapping for the given
+.Ar file-extension
+to the given
+.Ar mime-type .
+Both argument are strings.
+.It Ic port Ar portno
+The port to listen on.
+By default is 1965.
+.It Ic protocols Ar string
+Specify the TLS protocols to enable.
+Refer to
+.Xr tls_config_parse_protocols 3
+for the valid protocol string values.
+By default, both TLSv1.3 and TLSv1.2 are enabled.
+Use
+.Dq tlsv1.3
+to enable only TLSv1.3.
.It Ic user Ar string
Run the daemon as the given user.
.El
@@ -177,22 +177,45 @@ or a name including a wildcards,
.Pp
Followed by a block of options that is enclosed in curly brackets:
.Bl -tag -width Ds
+.It Ic auto Ic index Ar bool
+If no index file is found, automatically generate a directory listing.
+It's disabled by default.
+.It Ic block Op Ic return Ar code Op Ar meta
+Send a reply and close the connection;
+.Ar code
+is 40
+and
+.Ar meta
+is
+.Dq temporary failure
+by default.
+If
+.Ar code
+is in the 3x range, then
+.Ar meta
+must be provided.
+Inside
+.Ar meta ,
+the following special sequences are replaced:
+.Bl -tag -compact
+.It \&%\&%
+is replaced with a single
+.Sq \&% .
+.It \&%p
+is replaced with the request path.
+.It \&%q
+is replaced with the query string of the request.
+.It \&%P
+is replaced with the server port.
+.It \&%N
+is replaced with the server name.
+.El
.It Ic cert Pa file
Path to the certificate to use for this server.
The
.Pa file
should contain a PEM encoded certificate.
This option is mandatory.
-.It Ic key Pa file
-Specify the private key to use for this server.
-The
-.Pa file
-should contain a PEM encoded private key.
-This option is mandatory.
-.It Ic root Pa directory
-Specify the root directory for this server.
-This option is mandatory.
-It's relative to the chroot, if enabled.
.It Ic cgi Pa path
Execute CGI scripts that matches
.Pa path
@@ -204,18 +227,26 @@ If not specified, the
.Ic default type
is set to
.Dq application/octet-stream .
+.It Ic entrypoint Pa path
+Make the CGI script at
+.Pa path
+.Pq relative to the Ic root No directory
+handle all the requests for the current virtual host
+.It Ic index Ar string
+Set the directory index file.
+If not specified, it defaults to
+.Pa index.gmi .
+.It Ic key Pa file
+Specify the private key to use for this server.
+The
+.Pa 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 index Ar string
-Set the directory index file.
-If not specified, it defaults to
-.Pa index.gmi .
-.It Ic auto Ic index Ar bool
-If no index file is found, automatically generate a directory listing.
-It's disabled by default.
.It Ic location Pa path Brq ...
Specify server configuration rules for a specific location.
The
@@ -230,51 +261,20 @@ A
.Ic location
section may include most of the server configuration rules
except
-.Ic cert , Ic key , Ic root , Ic location No ,
+.Ic cert , Ic key , Ic root , Ic location ,
.Ic entrypoint No and Ic cgi .
-.It Ic block Op Ic return Ar code Op Ar meta
-Send a reply and close the connection;
-.Ar code
-is 40
-and
-.Ar meta
-is
-.Dq temporary failure
-by default.
-If
-.Ar code
-is in the 3x range, then
-.Ar meta
-must be provided.
-Inside
-.Ar meta ,
-the following special sequences are replaced:
-.Bl -tag -compact
-.It \&%\&%
-is replaced with a single
-.Sq \&% .
-.It \&%p
-is replaced with the request path.
-.It \&%q
-is replaced with the query string of the request.
-.It \&%P
-is replaced with the server port.
-.It \&%N
-is replaced with the server name.
-.El
+.It Ic root Pa directory
+Specify the root directory for this server.
+This option is mandatory.
+It's relative to the chroot, if enabled.
.It Ic strip Ar number
Strip
.Ar number
components from the beginning of the path.
It's only considered for the
.Ar meta
-parameter in the scope of a matching
+parameter in the scope of a
.Ic block return .
-.It Ic entrypoint Pa path
-Make the CGI script at
-.Pa path
-.Pq relative to the Ic root No directory
-handle all the requests for the current virtual host
.El
.Sh CGI
When a request for an executable file matches the