NAME
galileo.conf
—
galileo configuration file
DESCRIPTION
galileo.conf
is the run-time configuration
file for galileo(8).
The file format is line-based, with one configuration directive per line. Any lines beginning with a ‘#’ are treated as comments and ignored.
GLOBAL CONFIGURATION
The available global configuration directives are as follows:
chroot
path- Set the chroot(2) directory. If not specified, it defaults to /var/www, the home directory of the www user.
prefork
number- Run the specified number of proxy processes. galileo(8) runs 3 proxy processes by default.
PROXY CONFIGURATION
At least one proxy must be defined for galileo(8) to work.
A proxy context is declared with a unique name, followed by proxy-specific configuration directive inside curly braces:
proxy
name {...}
The available proxy configuration directives are as follows:
hostname
name- Specify the name used for SNI and the Gemini
request. Defaults to the address given in the
source
option. source
address [port
port]- Specify to which address and port connect to. port is 1965 by default. It's the only mandatory option.
stylesheet
path- Specify the path to the stylesheet linked in the generated HTML. This must be a valid absolute URI. Defaults to galileo.css with prepended the URL prefix on which galileo(8) is served.
no footer
- Do not add a footer with the original link at the bottom of the generated page.
no image preview
- Do not generate a preview for links that seem to point to an image.
galileo
uses an heuristic to determine if a link points to an image that may be inappropriate and not work in some circumstances. no navigation bar
- Do no add a navigation bar at the top of the generated page.
no tls
- Do not setup the TLS layer. Useful for saving some CPU cycles when connecting to a Gemini server listening on localhost that is able to speak Gemini without TLS. TLS is enabled by default.
FILES
- /etc/galileo.conf
- Default location of the
galileo.conf
configuration file.
EXAMPLES
The following example will proxy the Gemini capsule ‘gemini://gemini.example.com’ as ‘www.example.com’ over HTTP:
proxy "www.example.com" { source "gemini.example.com" }
A more complex example where the Gemini server is running on a non-standard port:
proxy "www.example.com" { source 127.0.0.1 port 10965 hostname "gemini.example.com" }
The matching configuration for httpd(8) is:
server "www.example.com" { listen on * port 80 listen on * tls port 443 tls { certificate "/etc/ssl/example.com.fullchain.pem" key "/etc/ssl/private/example.com.key" } location "/.well-known/acme-challenge/*" { root "/acme" request strip 2 } location "/galileo.css" { root "/htdocs" } location "/*" { fastcgi socket "/run/galileo.sock" } }
galileo(8) can also be exposed under a URL path prefix. The following example proxies the same Gemini capsule as ‘www.example.com/galileo/’ over HTTP. The only change is in the httpd(8) configuration, as galileo(8) handles this case transparently if the HTTP server properly defines the ‘PATH_INFO’ and ‘SCRIPT_NAME’ FastCGI parameters.
server "www.example.com" { listen on * port 80 location "/galileo/galileo.css" { request strip 1 root "/htdocs" } location "/galileo/*" { request strip 1 fastcgi socket "/run/galileo.sock" } }