mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-04 08:51:51 +02:00
Additional doc/updates
This commit is contained in:
parent
a257a9ba4b
commit
4ab08287a2
2 changed files with 57 additions and 4 deletions
39
docs/web_server.md
Normal file
39
docs/web_server.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Web Server
|
||||
ENiGMA½ comes with a built in *content server* for supporting both HTTP and HTTPS. Currently the [File Bases](file_base.md) registeres routes for file downloads, and static files can also be served for your BBS. Other features will likely come in the future or you can easily write your own!
|
||||
|
||||
## Configuration
|
||||
By default the web server is not enabled. To enable it, you will need to at a minimum configure two keys in the `contentServers::web` section of `config.hjson`:
|
||||
|
||||
```hjson
|
||||
contentServers: {
|
||||
web: {
|
||||
domain: bbs.yourdomain.com
|
||||
|
||||
http: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This will configure HTTP for port 8080 (override with `port`). To additionally enable HTTPS, you will need a PEM encoded SSL certificate and private key. Once obtained, simply enable the HTTPS server:
|
||||
```hjson
|
||||
contentServers: {
|
||||
web: {
|
||||
domain: bbs.yourdomain.com
|
||||
|
||||
https: {
|
||||
enabled: true
|
||||
port: 8443
|
||||
certPem: /path/to/your/cert.pem
|
||||
keyPem: /path/to/your/cert_private_key.pem
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Static Routes
|
||||
Static files live relative to the `contentServers::web::staticRoot` path which defaults to `enigma-bbs/www`.
|
||||
|
||||
### Custom Error Pages
|
||||
Customized error pages can be created for [HTTP error codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error) by providing a `<error_code>.html` file in the *static routes* area. For example: `404.html`.
|
Loading…
Add table
Add a link
Reference in a new issue