Blob


1 .\"
2 .\" Copyright (c) 2022 Omar Polo
3 .\"
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.
7 .\"
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 14, 2022
16 .Dt GALILEO.CONF 5
17 .Os
18 .Sh NAME
19 .Nm galileo.conf
20 .Nd galileo configuration file
21 .Sh DESCRIPTION
22 .Nm
23 is the run-time configuration file for
24 .Xr galileo 8 .
25 .Pp
26 The file format is line-based, with one configuration directive per line.
27 Any lines beginning with a
28 .Sq #
29 are treated as comments and ignored.
30 .Sh GLOBAL CONFIGURATION
31 The available global configuration directives are as follows:
32 .Bl -tag -width Ds
33 .It Ic chroot Ar path
34 Set the path to the
35 .Xr chroot 2
36 used by
37 .Xr galileo 8 .
38 .It Ic prefork Ar number
39 Specify the number of proxy processes.
40 .El
41 .Sh SERVER CONFIGURATION
42 At least one server context must exist for
43 .Xr galileo 8
44 to work.
45 .Pp
46 A server context is declared with a unique
47 .Ar name ,
48 followed by server-specific configuration directive inside curly braces:
49 .Pp
50 .Ic server Ar name Brq ...
51 .Pp
52 The available server configuration directives are as follows:
53 .Bl -tag -width Ds
54 .It Ic proxy Brq ...
55 Define the proxy configuration for the matching host.
56 The available proxy configuration directives are as follows:
57 .Bl -tag -width Ds
58 .It Ic source Ar address Ic port Ar port
59 Specify to which
60 .Ar address
61 and
62 .Ar port
63 connect to.
64 .It Ic hostname Ar name
65 Specify the
66 .Ar name
67 used for SNI and the Gemini request.
68 .El
69 .It Ic stylesheet Ar path
70 Specify the path to the stylesheet linked in the generated HTML.
71 .El
72 .Sh FILES
73 .Bl -tag -width Ds -compact
74 .It Pa /etc/galileo.conf
75 Default location of the
76 .Nm
77 configuration file.
78 .El
79 .Sh EXAMPLES
80 The following example will proxy the Gemini capsule
81 .Sq gemini://gemini.example.com
82 as
83 .Sq https://www.example.com
84 .Pq or Sq http://
85 assuming a Gemini server is listening on 127.0.0.1:
86 .Bd -literal -offset indent
87 server "www.example.com" {
88 proxy {
89 source 127.0.0.1 port 1965
90 hostname "gemini.example.com"
91 }
92 stylesheet "/galileo.css"
93 }
94 .Ed
95 .Pp
96 The matching configuration for
97 .Xr httpd 8
98 is:
99 .Bd -literal -offset indent
100 server "www.example.com" {
101 listen on * port 80
102 listen on * tls port 443
103 tls {
104 certificate "/etc/ssl/example.com.fullchain.pem"
105 key "/etc/ssl/private/example.com.key"
107 location "/.well-known/acme-challenge/*" {
108 root "/acme"
109 request strip 2
111 location "/galileo.css" {
112 root "/htdocs"
114 location "/*" {
115 fastcgi socket "/run/galileo.sock"
118 .Ed
119 .Sh SEE ALSO
120 .Xr httpd.conf 5 ,
121 .Xr galileo 8 ,
122 .Xr httpd 8