mirror of
https://github.com/BluemediaGER/nginx-live.git
synced 2024-11-22 17:55:29 +01:00
Move HLS file path to tempfs
This commit is contained in:
parent
75321cb769
commit
80202deb89
|
@ -72,7 +72,8 @@ rtmp {
|
||||||
|
|
||||||
# Turn on HLS
|
# Turn on HLS
|
||||||
hls on;
|
hls on;
|
||||||
hls_path /var/www/html/hls/;
|
hls_path /tmp/hls;
|
||||||
|
hls_fragment_naming system;
|
||||||
hls_fragment {HLS_FRAGMENT_LENGTH};
|
hls_fragment {HLS_FRAGMENT_LENGTH};
|
||||||
hls_playlist_length {HLS_PLAYLIST_LENGTH};
|
hls_playlist_length {HLS_PLAYLIST_LENGTH};
|
||||||
}
|
}
|
||||||
|
@ -108,12 +109,17 @@ http {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable cache
|
# Serve HLS files from tempfs
|
||||||
add_header 'Cache-Control' 'no-cache';
|
location /hls {
|
||||||
|
root /tmp;
|
||||||
|
# Don't let browsers cache HLS files
|
||||||
|
add_header Cache-Control no-cache;
|
||||||
|
}
|
||||||
|
|
||||||
root /var/www/html/;
|
# Serve frontend
|
||||||
index index.html index.htm;
|
|
||||||
location / {
|
location / {
|
||||||
|
root /var/www/html;
|
||||||
|
index index.html index.htm;
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,8 @@ rtmp {
|
||||||
|
|
||||||
# Turn on HLS
|
# Turn on HLS
|
||||||
hls on;
|
hls on;
|
||||||
hls_path /var/www/html/hls/;
|
hls_path /tmp/hls;
|
||||||
|
hls_fragment_naming system;
|
||||||
hls_fragment {HLS_FRAGMENT_LENGTH};
|
hls_fragment {HLS_FRAGMENT_LENGTH};
|
||||||
hls_playlist_length {HLS_PLAYLIST_LENGTH};
|
hls_playlist_length {HLS_PLAYLIST_LENGTH};
|
||||||
}
|
}
|
||||||
|
@ -95,12 +96,17 @@ http {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable cache
|
# Serve HLS files from tempfs
|
||||||
add_header 'Cache-Control' 'no-cache';
|
location /hls {
|
||||||
|
root /tmp;
|
||||||
|
# Don't let browsers cache HLS files
|
||||||
|
add_header Cache-Control no-cache;
|
||||||
|
}
|
||||||
|
|
||||||
root /var/www/html/;
|
# Serve frontend
|
||||||
index index.html index.htm;
|
|
||||||
location / {
|
location / {
|
||||||
|
root /var/www/html;
|
||||||
|
index index.html index.htm;
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue