2019-03-30 08:18:54 +00:00
|
|
|
### Setup https access for RTL
|
|
|
|
|
|
|
|
Forward the ports 80 and 3002 on the router to the device running RTL.
|
|
|
|
Allow the ports through the firewall of the device.
|
|
|
|
|
|
|
|
Install Nginx:
|
|
|
|
https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
|
|
|
|
|
|
|
|
Install certbot to acquire the ssl certificate:
|
|
|
|
https://certbot.eff.org
|
|
|
|
|
|
|
|
|
2019-04-09 23:28:00 +00:00
|
|
|
Add the following line at the very top of nginx.conf:
|
|
|
|
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
|
|
|
|
|
|
|
|
|
2019-03-30 08:18:54 +00:00
|
|
|
Sample configuration to be inserted in the nginx.conf (adjust the path and filename of your certificate and key):
|
|
|
|
|
|
|
|
|
2019-04-09 23:28:00 +00:00
|
|
|
|
2019-03-30 08:18:54 +00:00
|
|
|
stream {
|
|
|
|
upstream RTL {
|
|
|
|
server 127.0.0.1:3000;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 3002 ssl;
|
|
|
|
proxy_pass RTL;
|
|
|
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem;
|
|
|
|
ssl_session_cache shared:SSL:1m;
|
|
|
|
ssl_session_timeout 4h;
|
|
|
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-09 23:28:00 +00:00
|
|
|
Restart Nginx with the new configuration and connect to RTL over https on the port 3002.
|