Blame


1 445816c2 2022-04-07 op # Frequently Asked Questions
2 445816c2 2022-04-07 op
3 445816c2 2022-04-07 op ## How can I report a bug, suggest a feature or send a patch?
4 445816c2 2022-04-07 op
5 6660c0bd 2024-01-05 op Just drop an email to <gmid [at] omarpolo [dot] com> or open an issue/pull request on Codeberg or Github.
6 445816c2 2022-04-07 op
7 6660c0bd 2024-01-05 op => https://codeberg.org/op/gmid Codeberg mirror
8 6660c0bd 2024-01-05 op => https://github.com/omar-polo/gmid GitHub mirror
9 445816c2 2022-04-07 op
10 6660c0bd 2024-01-05 op When reporting a bug please include the relevant information to reproduce the issue you're facing: your configuration file, the gmid version, and your operating system or distro at least.
11 445816c2 2022-04-07 op
12 6660c0bd 2024-01-05 op
13 445816c2 2022-04-07 op ## How can I define the right MIME types for my files?
14 445816c2 2022-04-07 op
15 445816c2 2022-04-07 op gmid, like many other servers, uses a list of known file extensions to decide what MIME type use. A few of them are built-in for convenience but it's quite easy to add custom ones:
16 445816c2 2022-04-07 op
17 445816c2 2022-04-07 op ``` example of how to use the type rule in the configuration file
18 445816c2 2022-04-07 op types {
19 445816c2 2022-04-07 op application/postscript ps eps ai
20 445816c2 2022-04-07 op application/rss+xml rss
21 445816c2 2022-04-07 op
22 445816c2 2022-04-07 op # it's also possible to just include a file here
23 445816c2 2022-04-07 op include "/usr/share/misc/mime.types"
24 445816c2 2022-04-07 op }
25 445816c2 2022-04-07 op ```
26 445816c2 2022-04-07 op
27 445816c2 2022-04-07 op
28 6660c0bd 2024-01-05 op ## How to run CGI scripts?
29 445816c2 2022-04-07 op
30 6660c0bd 2024-01-05 op As of gmid 2.0, to run CGI scripts an external program like fcgiwrap or slowcgi are needed.
31 445816c2 2022-04-07 op
32 6660c0bd 2024-01-05 op From the gmid side, one `fastcgi' block needs to be defined with the `socket' pointing at the fcgiwrap or slowcgi socket inside the chroot. The `SCRIPT_NAME' parameter pointing to the script path is often needed since gmid is unable to deduce the right path otherwise.
33 445816c2 2022-04-07 op
34 6660c0bd 2024-01-05 op ``` example configuration that runs a CGI via slowcgi
35 6660c0bd 2024-01-05 op server "example.com" {
36 6660c0bd 2024-01-05 op listen on *
37 6660c0bd 2024-01-05 op cert "/path/to/cert"
38 6660c0bd 2024-01-05 op key "/path/to/key"
39 445816c2 2022-04-07 op
40 6660c0bd 2024-01-05 op location "/cgi-bin/hello" {
41 6660c0bd 2024-01-05 op fastcgi {
42 6660c0bd 2024-01-05 op socket "/run/slowcgi.sock"
43 6660c0bd 2024-01-05 op param SCRIPT_NAME = "/cgi-bin/hello"
44 6660c0bd 2024-01-05 op }
45 6660c0bd 2024-01-05 op }
46 6660c0bd 2024-01-05 op }
47 445816c2 2022-04-07 op ```
48 445816c2 2022-04-07 op
49 6660c0bd 2024-01-05 op Then, fcgiwrap or slowcgi need to be started as well.
50 445816c2 2022-04-07 op
51 445816c2 2022-04-07 op
52 6660c0bd 2024-01-05 op ## How to automatically renew the certificates?
53 445816c2 2022-04-07 op
54 6660c0bd 2024-01-05 op It depends on how the certificate were obtained. For example, if acme-client or certbot are used they provide their own mechanism to renew the certs and restart daemons.
55 445816c2 2022-04-07 op
56 6660c0bd 2024-01-05 op In case of a self-signed certificate, contrib/renew-certs could help. It's meant to be scheduled periodically with cron(8) and automatically generate a new key and certificate when one is about to expire and restarts gmid.
57 445816c2 2022-04-07 op
58 6660c0bd 2024-01-05 op => TREE/contrib/renew-certs contrib/renew-certs