diff --git a/README.md b/README.md index e6036d4..28d0716 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,6 @@ ### Powered by +https://github.com/tiangolo/nginx-rtmp-docker https://github.com/zom-bi/zomstream - +https://github.com/Abdisalan/blog-code-examples/tree/master/live-stream-part-3 diff --git a/rtmp/nginx.conf b/rtmp/nginx.conf index 366f3b9..c06dddf 100644 --- a/rtmp/nginx.conf +++ b/rtmp/nginx.conf @@ -28,6 +28,23 @@ http { gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + server { + listen 18080; + + location = /stat { + rtmp_stat all; + #rtmp_stat_stylesheet stat.xsl; + #auth_basic Restricted Content; # Create a valid .htpasswd before uncommenting this. + #auth_basic_user_file .htpasswd; # Create a valid .htpasswd before uncommenting this. + + } + + location = /control { + rtmp_control all; + #add_header Access-Control-Allow-Origin * always; + } + } + server { listen 8080; @@ -37,23 +54,11 @@ http { add_header Access-Control-Allow-Origin *; } - location /control { - rtmp_control all; - add_header Access-Control-Allow-Origin * always; + location /admin { + proxy_pass http://frontend:5001; + include /etc/nginx/mime.types; } - location /stats { - rtmp_stat all; - #rtmp_stat_stylesheet stat.xsl; - #auth_basic Restricted Content; # Create a valid .htpasswd before uncommenting this. - #auth_basic_user_file .htpasswd; # Create a valid .htpasswd before uncommenting this. - } - - #location /admin { - # proxy_pass http://frontend:5001; - # include /etc/nginx/mime.types; - #} - location /hls { types { application/vnd.apple.mpegurl m3u8; @@ -81,6 +86,16 @@ http { } } + location /flv { + flv_live on; + add_header Access-Control-Allow-Origin *; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + } }