Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://address:port - address to original HLS server
- # /ramcache - directory for cache. mount -t tmpfs tmpfs /ramcache
- server {
- listen 30000;
- server_name _;
- location / {
- root /ramcache;
- try_files $request_uri @proxy_origin;
- }
- location ~* \.(m3u8)$ {
- proxy_cache off;
- expires -1;
- proxy_pass http://address:port;
- }
- location ~* \.(ts|trp)$ {
- root /ramcache;
- try_files $request_uri @proxy_origin;
- }
- location @proxy_origin {
- resolver 8.8.8.8;
- proxy_pass http://address:port;
- proxy_temp_path "/ramcache/tmp";
- proxy_store "/ramcache/$request_uri";
- proxy_store_access user:rw group:rw all:r;
- proxy_method GET;
- proxy_set_header Host $host;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement