diff --git a/trunk/conf/hls.edge.conf b/trunk/conf/hls.edge.conf new file mode 100644 index 000000000..84e1dc5bc --- /dev/null +++ b/trunk/conf/hls.edge.conf @@ -0,0 +1,37 @@ + +worker_processes 3; +events { + worker_connections 10240; +} + +http { + # For Proxy Cache. + proxy_cache_path /tmp/nginx-cache levels=1:2 keys_zone=srs_cache:8m max_size=1000m inactive=600m; + proxy_temp_path /tmp/nginx-cache/tmp; + + server { + listen 8081; + # For Proxy Cache. + proxy_cache_valid 404 10s; + proxy_cache_lock on; + proxy_cache_lock_age 300s; + proxy_cache_lock_timeout 300s; + proxy_cache_min_uses 1; + + location ~ /.+/.*\.(m3u8)$ { + proxy_pass http://127.0.0.1:8080$request_uri; + # For Proxy Cache. + proxy_cache srs_cache; + proxy_cache_key $scheme$proxy_host$uri$args; + proxy_cache_valid 200 302 10s; + } + location ~ /.+/.*\.(ts)$ { + proxy_pass http://127.0.0.1:8080$request_uri; + # For Proxy Cache. + proxy_cache srs_cache; + proxy_cache_key $scheme$proxy_host$uri; + proxy_cache_valid 200 302 60m; + } + } +} + diff --git a/trunk/conf/hls.origin.conf b/trunk/conf/hls.origin.conf new file mode 100644 index 000000000..5eaab957b --- /dev/null +++ b/trunk/conf/hls.origin.conf @@ -0,0 +1,15 @@ + +listen 1935; +max_connections 1000; +daemon off; +srs_log_tank console; +http_server { + enabled on; + listen 8080; +} +vhost __defaultVhost__ { + hls { + enabled on; + } +} +