* Docs theme to match ENiGMA website

* New docs layout ready for github pages serving
* Tonnes of new docs
* Update gitignore
* Probably other stuff too
This commit is contained in:
David Stephens
2018-01-31 23:35:54 +00:00
parent 06ea2d1600
commit 26849ba4fa
62 changed files with 1974 additions and 810 deletions

36
docs/servers/ssh.md Normal file
View File

@@ -0,0 +1,36 @@
---
layout: page
title: SSH Server
---
## Generate a SSH Private Key
To utilize the SSH server, an SSH Private Key will need generated. From the ENiGMA installation directory:
```bash
openssl genrsa -des3 -out ./config/ssh_private_key.pem 2048
```
You then need to enable the SSH server in your `config.hjson`:
```hjson
{
loginServers: {
ssh: {
enabled: true
port: 8889
privateKeyPass: YOUR_PK_PASS
}
}
}
```
### SSH Server Options
| Option | Description
|---------------------|--------------------------------------------------------------------------------------|
| `privateKeyPem` | Path to private key file
| `privateKeyPass` | Password to private key file
| `firstMenu` | First menu an SSH connected user is presented with
| `firstMenuNewUser` | Menu presented to user when logging in with `users::newUserNames` in your config.hjson (defaults to `new` and `apply`)
| `enabled` | Enable/disable SSH server
| `port` | Configure a custom port for the SSH server

4
docs/servers/telnet.md Normal file
View File

@@ -0,0 +1,4 @@
---
layout: page
title: Telnet Server
---

View File

@@ -0,0 +1,55 @@
---
layout: page
title: 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!
## 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. [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
overrideUrlPrefix: https://bbs.yourdomain.com
https: {
enabled: true
port: 8443
certPem: /path/to/your/cert.pem
keyPem: /path/to/your/cert_private_key.pem
}
}
}
```
If no certificate paths are supplied, ENiGMA½ will assume the defaults of `/config/https_cert.pem` and
`/config/https_cert_key.pem` accordingly.
### 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`.

91
docs/servers/websocket.md Normal file
View File

@@ -0,0 +1,91 @@
---
layout: page
title: Web Socket / Web Interface Server
---
# VTX Web Client
ENiGMA supports the VTX websocket client for connecting to your BBS from a web page. Example usage can be found at
[Xibalba](https://l33t.codes/vtx/xibalba.html) and [fORCE9](https://bbs.force9.org/vtx/force9.html).
## Before You Start
There are a few things out of scope of this document:
- You'll need a web server for hosting the files - this can be anywhere, but it obviously makes sense to host it
somewhere with a hostname relevant to your BBS!
- It's not required, but you should use SSL certificates to secure your website, and for supplying to ENiGMA to
secure the websocket connections. [Let's Encrypt](https://letsencrypt.org/) provide a free well-respected service.
- How you make the websocket service available on the internet is up to you, but it'll likely by forwarding ports on
your router to the box hosting ENiGMA. Use the same method you did for forwarding the telnet port.
## Setup
1. Enable the websocket in ENiGMA, by adding `webSocket` configuration to the `loginServers` block (create it if you
don't already have it defined).
````hjson
loginServers: {
webSocket : {
port: 8810
enabled: true
securePort: 8811
certPem: /path/to/https_cert.pem
keyPem: /path/to/https_cert_key.pem
}
}
````
2. Restart ENiGMA and check the logs to ensure the websocket service starts successfully, you'll see something like the
following:
````
[2017-10-29T12:13:30.668Z] INFO: ENiGMA½ BBS/30978 on force9: Listening for connections (server="WebSocket (insecure)", port=8810)
[2017-10-29T12:13:30.669Z] INFO: ENiGMA½ BBS/30978 on force9: Listening for connections (server="WebSocket (secure)", port=8811)
````
3. Download the [VTX_ClientServer](https://github.com/codewar65/VTX_ClientServer/archive/master.zip) to your
webserver, and unpack it to a temporary directory.
4. Download the example [VTX client HTML file](/misc/vtx/vtx.html) and save it to your webserver root.
5. Create an `assets/vtx` directory within your webserver root, so you have a structure like the following:
````text
├── assets
│   └── vtx
└── vtx.html
````
6. From the VTX_ClientServer package unpacked earlier, copy the contents of the `www` directory into `assets/vtx` directory.
7. Create a vtxdata.js file, and save it to `assets/vtx`:
````javascript
var vtxdata = {
sysName: "Your Awesome BBS",
wsConnect: "wss://your-hostname.here:8811"
term: "ansi-bbs",
codePage: "CP437",
fontName: "UVGA16",
fontSize: "24px",
crtCols: 80,
crtRows: 25,
crtHistory: 500,
xScale: 1,
initStr: "",
defPageAttr: 0x1010,
defCrsrAttr: 0x0207,
defCellAttr: 0x0007,
telnet: 1,
autoConnect: 0
};
````
8. Update `sysName` and `wsConnect` accordingly. Use `wss://` if you set up the websocket service with SSL, `ws://`
otherwise.
9. If you navigate to http://your-hostname.here/vtx.html, you should see a splash screen like the following:
![VTXClient](../images/vtxclient.png "VTXClient")