From 7f18f3d6140b8a6253cec45cd59469329c937527 Mon Sep 17 00:00:00 2001 From: David Stephens Date: Sun, 29 Oct 2017 12:50:25 +0000 Subject: [PATCH] Add note about LetsEncrypt to webserver docs --- docs/web_server.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/web_server.md b/docs/web_server.md index 8c341191..1f87cd80 100644 --- a/docs/web_server.md +++ b/docs/web_server.md @@ -1,8 +1,10 @@ # Web Server -ENiGMA½ comes with a built in *content server* for supporting both HTTP and HTTPS. Currently the [File Bases](file_base.md) registers 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! +ENiGMA½ comes with a built in *content server* for supporting both HTTP and HTTPS. Currently the +[File Bases](file_base.md) registers 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`: +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: { @@ -16,12 +18,17 @@ contentServers: { } ``` -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: +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. [LetsEncrypt](https://letsencrypt.org/) supply free trusted +certificates that work perfectly with ENiGMA½. + +Once obtained, simply enable the HTTPS server: + ```hjson contentServers: { web: { domain: bbs.yourdomain.com - // set 'overrideUrlPrefix' if for example, you use a transparent proxy in front of ENiGMA and need to be explicit about URLs the system hands out + // set 'overrideUrlPrefix' if for example, you use a transparent proxy in front of ENiGMA and need to be explicit about URLs the system hands out overrideUrlPrefix: https://bbs.yourdomain.com https: { enabled: true @@ -37,4 +44,5 @@ contentServers: { 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 `.html` file in the *static routes* area. For example: `404.html`. +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 `.html` file in the *static routes* area. For example: `404.html`.