mirror of
https://github.com/omar-polo/gmid.git
synced 2024-10-07 01:37:19 +02:00
59 lines
2.1 KiB
Plaintext
59 lines
2.1 KiB
Plaintext
# Frequently Asked Questions
|
|
|
|
## How can I report a bug, suggest a feature or send a patch?
|
|
|
|
Just drop an email to <gmid [at] omarpolo [dot] com> or open an issue/pull request on Codeberg or Github.
|
|
|
|
=> https://codeberg.org/op/gmid Codeberg mirror
|
|
=> https://github.com/omar-polo/gmid GitHub mirror
|
|
|
|
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.
|
|
|
|
|
|
## How can I define the right MIME types for my files?
|
|
|
|
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:
|
|
|
|
``` example of how to use the type rule in the configuration file
|
|
types {
|
|
application/postscript ps eps ai
|
|
application/rss+xml rss
|
|
|
|
# it's also possible to just include a file here
|
|
include "/usr/share/misc/mime.types"
|
|
}
|
|
```
|
|
|
|
|
|
## How to run CGI scripts?
|
|
|
|
As of gmid 2.0, to run CGI scripts an external program like fcgiwrap or slowcgi are needed.
|
|
|
|
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.
|
|
|
|
``` example configuration that runs a CGI via slowcgi
|
|
server "example.com" {
|
|
listen on *
|
|
cert "/path/to/cert"
|
|
key "/path/to/key"
|
|
|
|
location "/cgi-bin/hello" {
|
|
fastcgi {
|
|
socket "/run/slowcgi.sock"
|
|
param SCRIPT_NAME = "/cgi-bin/hello"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Then, fcgiwrap or slowcgi need to be started as well.
|
|
|
|
|
|
## How to automatically renew the certificates?
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
=> TREE/contrib/renew-certs contrib/renew-certs
|