Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
34 changes: 26 additions & 8 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
user www;
worker_processes auto;
daemon off;

Expand All @@ -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;
Expand All @@ -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

Expand Down Expand Up @@ -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;
Expand Down