diff options
author | Omar Polo <op@omarpolo.com> | 2021-04-29 19:46:51 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-04-29 19:46:51 +0000 |
commit | 08ce6f527354b37ddbcf39b8680708239f1e8c12 (patch) | |
tree | 6bf7c41121c0b485227ec00994f445482a6d1d8b /README.md | |
parent | d06d6f4bba4851cb31464867d83b369d22bf3e2c (diff) |
tweaked the readme a bit
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 65 |
1 files changed, 39 insertions, 26 deletions
@@ -9,23 +9,18 @@ featureful server. (random order) + - sandboxed by default on OpenBSD, Linux and FreeBSD - reconfiguration: reload the running configuration without interruption - - sandboxed by default on OpenBSD, Linux and FreeBSD - automatic redirect/error pages (see `block return`) - IRI support (RFC3987) - - punycode support - - dual stack (IPv4 and IPv6) - automatic certificate generation for config-less mode - CGI scripts - - low memory footprint + - virtual hosts + - location rules - event-based asynchronous I/O model + - low memory footprint - small codebase, easily hackable - - virtual hosts - - per-location rules - - optional directory listings - - configurable mime types - - chroot support ## Internationalisation (IRIs, UNICODE, punycode, all that stuff) @@ -50,28 +45,46 @@ doesn't do that (yet). ## Configuration gmid has a rich configuration file, heavily inspired by OpenBSD' -httpd. While you should definitely check the manpage because it -documents every option in depth, here's a small example of how a -configuration file looks like. +httpd, with every detail carefully documented in the manpage. Here's +a minimal example of a config file: + +```conf +server "example.com" { + cert "/path/to/cert.pem" + key "/path/to/key.pem" + root "/var/gemini/example.com" +} +``` + +and a slightly complex one ```conf ipv6 on # enable ipv6 server "example.com" { - cert "/path/to/cert.pem" - key "/path/to/key.pem" - root "/var/gemini/example.com" - lang "it" - cgi "/cgi/*" - - location "/files/*" { - auto index on - } - - location "/repo/*" { - # change the index file name - index "README.gmi" - } + alias "foobar.com" + + cert "/path/to/cert.pem" + key "/path/to/key.pem" + root "/var/gemini/example.com" + + # lang for text/gemini files + lang "it" + + # execute CGI scripts in /cgi/ + cgi "/cgi/*" + + # only for locations that matches /files/* + location "/files/*" { + # generate directory listings + auto index on + } + + location "/repo/*" { + # change the index file name + index "README.gmi" + lang "en" + } } ``` |