Update readme with ssl docs. Updated nginx.conf.

This commit is contained in:
Alf 2018-11-21 22:54:46 -08:00
parent 09f63f98d0
commit 3257fdcfb6
2 changed files with 16 additions and 7 deletions

View File

@ -34,7 +34,14 @@ rtmp://<server ip>:1935/stream/$STREAM_NAME
```
### SSL
The `nginx.conf` is configured for both HTTP and HTTPS using a self-signed certificate supplied in [/certs](/certs). If you wish to use HTTPS, it is **highly recommended** to obtain your own certificates and update the `ssl_certificate` and `ssl_certificate_key` paths in [nginx.conf](nginx.conf).
To enable SSL, see [nginx.conf](nginx.conf) and uncomment the lines:
```
listen 443 ssl;
ssl_certificate /opt/certs/example.com.crt;
ssl_certificate_key /opt/certs/example.com.key;
```
This will enable HTTPS using a self-signed certificate supplied in [/certs](/certs). If you wish to use HTTPS, it is **highly recommended** to obtain your own certificates and update the `ssl_certificate` and `ssl_certificate_key` paths.
I recommend using [Certbot](https://certbot.eff.org/docs/install.html) from [Let's Encrypt](https://letsencrypt.org).

View File

@ -26,7 +26,8 @@ rtmp {
live on;
hls on;
hls_fragment_naming system;
hls_fragment 5s;
hls_fragment 5;
hls_playlist_length 10;
hls_path /opt/data/hls;
hls_nested on;
@ -46,12 +47,13 @@ http {
ssl_session_timeout 10m;
server {
listen 80; # Remove this line if you want HTTPS only.
listen 443 ssl;
listen 80;
# Update these paths with your own certificate and private key.
ssl_certificate /opt/certs/example.com.crt;
ssl_certificate_key /opt/certs/example.com.key;
# Uncomment these lines to enable SSL.
# Update the ssl paths with your own certificate and private key.
# listen 443 ssl;
# ssl_certificate /opt/certs/example.com.crt;
# ssl_certificate_key /opt/certs/example.com.key;
location /hls {
types {