Add docs about configuration and cgi-support
This commit is contained in:
parent
7f2150b6e9
commit
dbd5157042
4 changed files with 35 additions and 4 deletions
30
gmnd/docs/configure.gmi
Normal file
30
gmnd/docs/configure.gmi
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
gMNd has a config file in yaml format that you can supply on the command line with either of these options
|
||||||
|
-f
|
||||||
|
--file
|
||||||
|
|
||||||
|
This is the example config, supplied with the server
|
||||||
|
```
|
||||||
|
---
|
||||||
|
allow_dir_list: true
|
||||||
|
listen_addr: '0.0.0.0'
|
||||||
|
logg_level: 'DEBUG'
|
||||||
|
cgi_registry:
|
||||||
|
/envtest.*:
|
||||||
|
- ./cgi-bin/envtest.sh
|
||||||
|
```
|
||||||
|
This enables directory indexing, sets the listen address to 0.0.0.0 (all interfaces), the log level to DEBUG and registres the scrip ./cgi-bin/envtest.sh to serv content for any path that matches the regex /envtest.*.
|
||||||
|
|
||||||
|
A full list of options are here:
|
||||||
|
```
|
||||||
|
allow_dir_list = true/false, default false
|
||||||
|
base_path = the server root where you serve content from, default ./content
|
||||||
|
cgi_registry = you can set different cgi scripts to server content for different paths, no default
|
||||||
|
listen_addr = the ip address to listen to, default 127.0.0.1
|
||||||
|
listen_port = the port to listen to, default 1965
|
||||||
|
logg_level = any of "CRITICAL", "DEBUG", "ERROR", "INFO", "NOTSET", "WARNING", defult is INFO
|
||||||
|
server_cert = the path to the TLS cert, default ./certs/cert.pem
|
||||||
|
server_key = the path to the TLS key, default ./certs/cert.key
|
||||||
|
```
|
||||||
|
|
||||||
|
..
|
||||||
|
=> gemini://mic.ke/gmnd/docs/index.gmi back to gmnd/docs/
|
|
@ -1,6 +1,7 @@
|
||||||
# gMNd Documentation
|
# gMNd Documentation
|
||||||
|
|
||||||
=> gemini://mic.ke/gmnd/docs/running.gmi How to run gMNd
|
=> gemini://mic.ke/gmnd/docs/running.gmi How to run gMNd
|
||||||
|
=> gemini://mic.ke/gmnd/docs/configure.gmi How to configure gMNd
|
||||||
=> gemini://mic.ke/gmnd/docs/contributing.gmi How to contribute to gMNd
|
=> gemini://mic.ke/gmnd/docs/contributing.gmi How to contribute to gMNd
|
||||||
=> gemini://mic.ke/gmnd/docs/licensing.gmi gMNd is free software!
|
=> gemini://mic.ke/gmnd/docs/licensing.gmi gMNd is free software!
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,11 @@ By just running it, it will create self signed certs and serve example content f
|
||||||
```
|
```
|
||||||
docker run -p 1965:1965 gmnd
|
docker run -p 1965:1965 gmnd
|
||||||
```
|
```
|
||||||
A slightly more interesting thing it can do is serve your own content, in this example from /tmp/content on your host machine:
|
A slightly more interesting thing it can do is serve your own content, in this example from /tmp/content and dynamic content from /tmp/cgi-bin on your host machine:
|
||||||
```
|
```
|
||||||
docker run --mount type=bind,source="/tmp/content,target=/app/content" -p 1965:1965 gmnd
|
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/tmp/ccgi-bin,target=/app/cgi-bin"-p 1965:1965 gmnd
|
||||||
```
|
```
|
||||||
Or even supply your own certificates from the outside, in this example in /usr/local/certs:
|
Or even supply your own certificates from the outside, in this example in /usr/local/certs with static content from /tmp/content:
|
||||||
```
|
```
|
||||||
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/usr/local/certs,target=/app/certs" -p 1965:1965 gmnd
|
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/usr/local/certs,target=/app/certs" -p 1965:1965 gmnd
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# gMNd
|
# gMNd
|
||||||
gMNd is my gemini server. It is written in python, with the primary purpose to serve this content. You are very welcome to try it out however.
|
gMNd is my gemini server. It is written in python, with the primary purpose to serve this content. You are very welcome to try it out however.
|
||||||
|
|
||||||
Currently it only serves static files.
|
Currently it can both serves static files, or at your option generate dynamic content using cgi-scripts.
|
||||||
|
|
||||||
# Docs
|
# Docs
|
||||||
Some documention is available here:
|
Some documention is available here:
|
||||||
|
|
Loading…
Add table
Reference in a new issue