2 .\" Copyright (c) 2022 Omar Polo
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .Dd September 23, 2022
20 .Nd galileo configuration file
23 is the run-time configuration file for
26 The file format is line-based, with one configuration directive per line.
27 Any lines beginning with a
29 are treated as comments and ignored.
30 .Sh GLOBAL CONFIGURATION
31 The available global configuration directives are as follows:
37 If not specified, it defaults to
39 the home directory of the www user.
40 .It Ic prefork Ar number
41 Run the specified number of proxy processes.
43 runs 3 proxy processes by default.
45 .Sh PROXY CONFIGURATION
46 At least one proxy must be defined for
50 A proxy context is declared with a unique
52 followed by proxy-specific configuration directive inside curly braces:
54 .Ic proxy Ar name Brq ...
56 The available proxy configuration directives are as follows:
58 .It Ic hostname Ar name
61 used for SNI and the Gemini request.
62 Defaults to the address given in the
65 .It Ic source Ar address Op Ic port Ar port
73 It's the only mandatory option.
74 .It Ic stylesheet Ar path
75 Specify the path to the stylesheet linked in the generated HTML.
76 This must be a valid absolute URI.
79 with prepended the URL prefix on which
83 Do not add a footer with the original link at the bottom of the
85 .It Ic no image preview
86 Do not generate a preview for links that seem to point to an image.
88 uses an heuristic to determine if a link points to an image that may
89 be inappropriate and not work in some circumstances.
90 .It Ic no navigation bar
91 Do no add a navigation bar at the top of the generated page.
93 Do not setup the TLS layer.
94 Useful for saving some CPU cycles when connecting to a Gemini server
95 listening on localhost that is able to speak Gemini without TLS.
96 TLS is enabled by default.
99 .Bl -tag -width Ds -compact
100 .It Pa /etc/galileo.conf
101 Default location of the
106 The following example will proxy the Gemini capsule
107 .Sq gemini://gemini.example.com
111 .Bd -literal -offset indent
112 proxy "www.example.com" {
113 source "gemini.example.com"
117 A more complex example where the Gemini server is running on a
119 .Bd -literal -offset indent
120 proxy "www.example.com" {
121 source 127.0.0.1 port 10965
122 hostname "gemini.example.com"
126 The matching configuration for
129 .Bd -literal -offset indent
130 server "www.example.com" {
132 listen on * tls port 443
134 certificate "/etc/ssl/example.com.fullchain.pem"
135 key "/etc/ssl/private/example.com.key"
137 location "/.well-known/acme-challenge/*" {
141 location "/galileo.css" {
145 fastcgi socket "/run/galileo.sock"
151 can also be exposed under a URL path prefix.
152 The following example proxies the same Gemini capsule as
153 .Sq www.example.com/galileo/
155 The only change is in the
159 handles this case transparently if the HTTP server properly defines
165 .Bd -literal -offset indent
166 server "www.example.com" {
169 location "/galileo/galileo.css" {
173 location "/galileo/*" {
175 fastcgi socket "/run/galileo.sock"