Commit a8f3e8d6 authored by hark's avatar hark

bla

parent 1ee0d5be
Pipeline #1224 canceled with stage
......@@ -18,7 +18,7 @@ rtmp {
hls_fragment_naming system;
hls_fragment 5;
hls_playlist_length 10m;
hls_path /opt/data/hls/stream;
hls_path /var/www/hls/stream;
hls_nested on;
}
......@@ -31,7 +31,7 @@ rtmp {
hls_fragment 5;
hls_playlist_length 10m;
hls_path /opt/data/hls/transcoded;
hls_path /var/www/hls/transcoded;
hls_nested on;
hls_variant _hi BANDWIDTH=640000;
......@@ -50,12 +50,12 @@ http {
access_log /dev/stdout combined;
map $request_uri $expires {
default 1m;
default 59;
~*(.+\.ts)$ 1d;
~*(.+\.m3u8)$ 4;
}
map $request_uri $control {
default "public , s-maxage = 1m, max-age = 1m";
default "public , s-maxage = 59, max-age = 59";
~*(.+\.ts)$ "public , immutable , s-maxage = 1d, max-age = 1m";
~*(.+\.m3u8)$ "public, s-maxage = 4, max-age = 4";
#~*wordpress_logged_in "private, no-cache, no-store";
......@@ -65,38 +65,19 @@ http {
server {
listen 80;
root /opt/data;
root /var/www;
autoindex on;
add_header Cache-Control: public;
#add_header Cache-Control: public;
add_header Pragma public;
if_modified_since before;
etag on;
expires 1m;
#expires 1m;
# don't use location, first matching one is chose, not all of them
# location ~* (.+\.(jpg|jpeg|gif|png|ts))$ {
#immutable responses
# if ($request_uri ~* ".(ico|gif|jpe?g|png)$") | ($request_uri ~* "/image/") {
# if ( $request_uri ~* (.+\.ts)$ ) {
# expires max;
# add_header Cache-Control: public;
# add_header Cache-Control: immutable;
#}
#rewrite ^/$ http://${SD_HOST_HLS_CACHE}/player redirect;
location /player {
alias /www/player;
autoindex on;
}
location /hls {
location / {
autoindex on;
alias /var/www/;
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
......@@ -104,7 +85,6 @@ http {
add_header Cache-Control $control;
add_header Expires $expires;
alias /opt/data/hls;
add_header Access-Control-Allow-Origin *;
}
......@@ -114,20 +94,6 @@ http {
rtmp_stat_stylesheet static/stat.xsl;
}
location /static {
autoindex on;
alias /www/static;
}
location /brave {
autoindex on;
alias /www/brave;
}
location = /crossdomain.xml {
root /www/static;
default_type text/xml;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment