💾 Archived View for 80h.dev › projects › gemserv › files › README.gemini captured on 2022-04-29 at 12:33:00. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-03-01)
-=-=-=-=-=-=-
01 # Gemserv
02
03 A gemini server written in rust.
04
05 ## Features
06
07 - Vhosts
08 - CGI
09 - User directories
10 - Reverse proxy
11 - Redirect
12 - SCGI
13
14 ## Installation and running
15
16 OpenSSL 1.1.0g or LibreSSL 2.7.0 or newer is required.
17
18 - Clone the repo
19 - If you want to use all features run 'cargo build --release' or if you only
20 want to serve static files run 'cargo build --release --no-default-features'
21 - Modify the config.toml to your needs
22 - Run './target/release/gemserv config.toml'
23
24 ### Init scripts
25
26 In the init-scripts directory there's OpenRC(Courtesy of Tastytea) and systemd
27 service files.
28
29 ### NetBSD
30 If running on NetBSD you'll need to set the environmental variable OPENSSL_DIR
31 before compiling.
32
33 'export OPENSSL_DIR="/usr/pkg"'
34
35 Also to run you'll need to symlink libssl, and libcrypt to "/usr/lib" by
36 running:
37
38 'ln -s /usr/pkg/lib/libssl.so.1.1 /usr/lib'
39 'ln -s /usr/pkg/lib/libcrypt.so.1.1 /usr/lib'
40
41 Thanks to tiwesdaeg for figuring it out.
42
43 ## CGI and SCGI
44
45 There's example SCGI scripts for python and perl in the cgi-scripts directory.
46
47 In the configuration file there's "cgi" which is an optional bool to turn cgi
48 on. If it's true it'll run scripts from any directory. To limit it to only one
49 directory set "cgipath"
50
51 If "cgi" is false or not set the server will respond "Not Found" to any
52 executable file.
53
54 Scripts have 5 seconds to complete or they will be terminated.
55
56 ### CGI Environments
57
58
59 These variables are preset for you. If you need more you can define them in the
60 config file under "cgienv"
61
62 - GEMINI_URL
63 - SERVER_NAME
64 - SERVER_PROTOCOL
65 - SERVER_SOFTWARE
66 - SCRIPT_NAME
67 - REMOTE_ADDR
68 - REMOTE_HOST
69 - REMOTE_PORT
70 - QUERY_STRING
71 - PATH_INFO
72
73 TLS variables
74 - AUTH_TYPE
75 - TLS_CLIENT_HASH
76 - REMOTE_USER
77