diff --git a/Dockerfile b/Dockerfile index e4a2978..47d83cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,6 @@ ADD crossdomain.xml /usr/local/nginx/html/crossdomain.xml ADD nginx.conf /home/www RUN sudo chown -R www:www /usr/local/nginx -EXPOSE 80 443 1935 +EXPOSE 1024 443 1935 CMD ["/usr/local/nginx/sbin/nginx", "-c", "/home/www/nginx.conf"] diff --git a/nginx.conf b/nginx.conf index f48f8d9..f853162 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,3 +1,4 @@ +user www; worker_processes auto; daemon off; @@ -10,22 +11,22 @@ events { http { server { - listen 80; - listen 443 ssl; + listen 1024; + # listen 443 ssl; server_name vj.bluelighttapes.com; - ssl_certificate /etc/letsencrypt/live/vj.bluelighttapes.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/vj.bluelighttapes.com/privkey.pem; - + # ssl_certificate /etc/letsencrypt/live/vj.bluelighttapes.com/fullchain.pem; + # ssl_certificate_key /etc/letsencrypt/live/vj.bluelighttapes.com/privkey.pem; + # server_name stream.bluelighttapes.com localhost; location /hls { -# Serve HLS fragments + # Serve HLS fragments -# CORS setup + # CORS setup add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Expose-Headers' 'Content-Length'; -# allow CORS preflight requests + # allow CORS preflight requests if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Max-Age' 1728000; @@ -43,6 +44,17 @@ http { add_header Cache-Control no-cache; } + location /dash { + # Serve DASH fragments + types { + text/html html; + application/dash+xml mpd; + } + root /tmp; + add_header Cache-Control no-cache; + } + + location /vj { # Serve HLS fragments @@ -107,6 +119,12 @@ rtmp { hls_path /tmp/hls; } + application dash { + live on; + dash on; + dash_path /tmp/dash; + } + application vj { live on; meta copy;