2019-09-13 15:02:56 +00:00
|
|
|
## Configure REST API
|
|
|
|
|
|
|
|
### Enable REST API
|
|
|
|
* `/msg <bot> config bot rest-api on`
|
|
|
|
* `/msg <bot> reloadmodule rest_api`
|
|
|
|
|
|
|
|
### Configure HTTPd
|
2019-09-27 16:51:02 +00:00
|
|
|
Either set up a reverse proxy (with persisted Host header) with your favourite HTTPd or follow the instructions below.
|
|
|
|
|
2019-09-13 15:02:56 +00:00
|
|
|
#### Nginx
|
2019-09-13 15:06:14 +00:00
|
|
|
* Copy example config file from [/docs/rest_api/nginx](/docs/rest_api/nginx) to `/etc/nginx/sites-enabled`
|
2019-09-13 15:02:56 +00:00
|
|
|
* Edit `server-name`, `ssl_certificate` and `ssl_certificate_key`
|
2019-09-27 16:51:47 +00:00
|
|
|
* `$ service nginx restart` as root
|
2019-09-27 16:51:02 +00:00
|
|
|
|
|
|
|
#### Apache2
|
|
|
|
* Run `$ a2enmod ssl proxy proxy_http` as root
|
|
|
|
* Copy example config file from [/docs/rest_api/apache2](/docs/rest_api/apache2) to `/etc/apache2/sites-enabled/`
|
|
|
|
* Edit `ServerName`, `SSLCertificateFile and `SSLCertificateKeyFile`
|
2019-09-27 16:51:47 +00:00
|
|
|
* `$ service apache2 restart` as root
|
2019-09-27 16:51:02 +00:00
|
|
|
|
|
|
|
#### Lighttpd
|
|
|
|
* Copy example config file from [/docs/rest_api/lighttpd](/docs/rest_api/lighttpd) to `/etc/lighttpd/lighttpd.conf`
|
|
|
|
* Edit `ssl.ca-file`, `ssl.pemfile` and `ssl.privkey`
|
2019-09-27 16:52:27 +00:00
|
|
|
* `$ service lighttpd restart` as root
|