Nxing HLS Reverse Proxy The Next CEO of Stack OverflowNginx & UserDir & PHPNginx slow...

Why does the UK parliament need a vote on the political declaration?

Why didn't Khan get resurrected in the Genesis Explosion?

How do scammers retract money, while you can’t?

How fast would a person need to move to trick the eye?

Indicator light circuit

If the heap is initialized for security, then why is the stack uninitialized?

Written every which way

How to transpose the 1st and -1th levels of arbitrarily nested array?

Why do we use the plural of movies in this phrase "We went to the movies last night."?

What exact does MIB represent in SNMP? How is it different from OID?

Would a galaxy be visible from outside, but nearby?

Different harmonic changes implied by a simple descending scale

Received an invoice from my ex-employer billing me for training; how to handle?

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

Preparing Indesign booklet with .psd graphics for print

What benefits would be gained by using human laborers instead of drones in deep sea mining?

Why do professional authors make "consistency" mistakes? And how to avoid them?

Bold, vivid family

Do I need to enable Dev Hub in my PROD Org?

Rotate a column

In excess I'm lethal

Why does standard notation not preserve intervals (visually)

What can we do to stop prior company from asking us questions?

Should I tutor a student who I know has cheated on their homework?



Nxing HLS Reverse Proxy



The Next CEO of Stack OverflowNginx & UserDir & PHPNginx slow downloads even with low disk ioNginx reverse proxy returns incorrect urlHow to make nginx connect php-fpm with 127.0.0.1, not server's public ip?nginx HLS vod capability to stop and track streamsNginx permission error on try and index (actual file works fine)Nginx Reverse Proxy to another Nginx(No reverse proxy)NGINX - simple reverse proxydokuwiki, nginx and farmsNginx reverse proxy - .js and .css forbidden












0















I'm using 5 nginx servers as a reverse proxy to my origin. My origin only sends out HLS content, so .ts, .aac, .vtt and .m3u8 files.



This is working really well for the most part, but when I have about 8k - 12k active connections, making around 150rq/s I start to see degraded performance.



The largest files that I serve are around 3M, or 2.5mbps.



I'm hoping to figure out a way to allow more active connections or at least have 12k connections without degraded performance.



user  nginx;
worker_processes 8;
worker_priority -15;
worker_rlimit_nofile 1048576;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;

events {
worker_connections 1048576;
multi_accept on;
use epoll;
}


http {
include mime.types;
default_type application/octet-stream;

log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
error_log /var/log/nginx/error.log warn;
access_log /var/log/nginx/access.log main_ext;
access_log syslog:server=unix:/dev/log,tag=amplify,severity=info main_ext;
sendfile on;
#tcp_nopush on;
#tcp_nodelay on;

keepalive_timeout 120;
keepalive_requests 100000;
connection_pool_size 8192;

#gzip on;
open_file_cache max=400000 inactive=30s;
open_file_cache_errors off;
open_file_cache_min_uses 1;
open_file_cache_valid 60s;

include /etc/nginx/conf.d/*.conf;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

#location / {
# root html;
# index index.html index.htm;
#}


location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ .php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}


and



upstream backend {
ip_hash;
keepalive 100;
server server1;
server server2;
}

proxy_cache_path "/mnt/Delta/nginx_cache/nginx5/tmp/" levels=1:2 keys_zone=hls:10m inactive=2h use_temp_path=off;
proxy_cache hls;
proxy_cache_min_uses 1;

server {
listen 80;
#server_name localhost;


location = /healthz {
return 200;
access_log off;
}

location / {
root /mnt/Delta/nginx_cache;
try_files $request_uri @proxy_origin;
}
# location ~* .(mpd)$ {
# rewrite /middle/([^/]+)/$1 break;
# proxy_cache off;
# expires -1;
# proxy_pass http://backend$1;
# }
location ~* .(m3u8)$ {
rewrite /middle/([^/]+)/$1 break;
#proxy_cache off;
#expires -1;
proxy_cache_valid 200 302 5s;
proxy_ignore_headers "Set-Cookie";
proxy_hide_header "Set-Cookie";
add_header X-Proxy-Cache $upstream_cache_status;
add_header Host Nginx5;
proxy_buffering on;
proxy_buffer_size 1024k;
proxy_buffers 5 1024k;
proxy_pass http://backend$1;
}
#location ~* .(ts)$ {
# root /mnt/Delta/nginx_cache/tmp;
# try_files $request_uri @proxy_origin;
# proxy_pass http://backend$1;
#}
location @proxy_origin {
#resolver 10.196.160.160;
#proxy_buffering on;
#proxy_buffer_size 4096k;
#proxy_buffers 5 4096k;
proxy_pass http://backend$1;
proxy_cache_valid 404 3s;
proxy_cache_methods GET HEAD;
proxy_redirect off;
proxy_http_version 1.1;
proxy_read_timeout 10s;
proxy_send_timeout 10s;
proxy_connect_timeout 10s;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_background_update on;
proxy_cache_lock on;
#proxy_temp_path "/mnt/Delta/nginx_cache/nginx2/tmp";
#proxy_store "/mnt/Delta/nginx_cache/nginx2/tmp/$request_uri";
#proxy_store_access user:rw group:rw all:r;
#proxy_method GET;
proxy_set_header Host $host;
proxy_ignore_headers "Set-Cookie";
proxy_hide_header "Set-Cookie";
add_header X-Proxy-Cache $upstream_cache_status;
add_header Host Nginx5;
}

}









share|improve this question









New contributor




Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I'm using 5 nginx servers as a reverse proxy to my origin. My origin only sends out HLS content, so .ts, .aac, .vtt and .m3u8 files.



    This is working really well for the most part, but when I have about 8k - 12k active connections, making around 150rq/s I start to see degraded performance.



    The largest files that I serve are around 3M, or 2.5mbps.



    I'm hoping to figure out a way to allow more active connections or at least have 12k connections without degraded performance.



    user  nginx;
    worker_processes 8;
    worker_priority -15;
    worker_rlimit_nofile 1048576;

    #error_log logs/error.log;
    #error_log logs/error.log notice;
    #error_log logs/error.log info;
    #pid logs/nginx.pid;

    events {
    worker_connections 1048576;
    multi_accept on;
    use epoll;
    }


    http {
    include mime.types;
    default_type application/octet-stream;

    log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
    error_log /var/log/nginx/error.log warn;
    access_log /var/log/nginx/access.log main_ext;
    access_log syslog:server=unix:/dev/log,tag=amplify,severity=info main_ext;
    sendfile on;
    #tcp_nopush on;
    #tcp_nodelay on;

    keepalive_timeout 120;
    keepalive_requests 100000;
    connection_pool_size 8192;

    #gzip on;
    open_file_cache max=400000 inactive=30s;
    open_file_cache_errors off;
    open_file_cache_min_uses 1;
    open_file_cache_valid 60s;

    include /etc/nginx/conf.d/*.conf;

    server {
    listen 80;
    server_name localhost;

    #charset koi8-r;

    #access_log logs/host.access.log main;

    #location / {
    # root html;
    # index index.html index.htm;
    #}


    location /nginx_status {
    stub_status on;
    allow 127.0.0.1;
    deny all;
    }

    #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ .php$ {
    # proxy_pass http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ .php$ {
    # root html;
    # fastcgi_pass 127.0.0.1:9000;
    # fastcgi_index index.php;
    # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
    # include fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /.ht {
    # deny all;
    #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    # listen 8000;
    # listen somename:8080;
    # server_name somename alias another.alias;

    # location / {
    # root html;
    # index index.html index.htm;
    # }
    #}


    # HTTPS server
    #
    #server {
    # listen 443 ssl;
    # server_name localhost;

    # ssl_certificate cert.pem;
    # ssl_certificate_key cert.key;

    # ssl_session_cache shared:SSL:1m;
    # ssl_session_timeout 5m;

    # ssl_ciphers HIGH:!aNULL:!MD5;
    # ssl_prefer_server_ciphers on;

    # location / {
    # root html;
    # index index.html index.htm;
    # }
    #}

    }


    and



    upstream backend {
    ip_hash;
    keepalive 100;
    server server1;
    server server2;
    }

    proxy_cache_path "/mnt/Delta/nginx_cache/nginx5/tmp/" levels=1:2 keys_zone=hls:10m inactive=2h use_temp_path=off;
    proxy_cache hls;
    proxy_cache_min_uses 1;

    server {
    listen 80;
    #server_name localhost;


    location = /healthz {
    return 200;
    access_log off;
    }

    location / {
    root /mnt/Delta/nginx_cache;
    try_files $request_uri @proxy_origin;
    }
    # location ~* .(mpd)$ {
    # rewrite /middle/([^/]+)/$1 break;
    # proxy_cache off;
    # expires -1;
    # proxy_pass http://backend$1;
    # }
    location ~* .(m3u8)$ {
    rewrite /middle/([^/]+)/$1 break;
    #proxy_cache off;
    #expires -1;
    proxy_cache_valid 200 302 5s;
    proxy_ignore_headers "Set-Cookie";
    proxy_hide_header "Set-Cookie";
    add_header X-Proxy-Cache $upstream_cache_status;
    add_header Host Nginx5;
    proxy_buffering on;
    proxy_buffer_size 1024k;
    proxy_buffers 5 1024k;
    proxy_pass http://backend$1;
    }
    #location ~* .(ts)$ {
    # root /mnt/Delta/nginx_cache/tmp;
    # try_files $request_uri @proxy_origin;
    # proxy_pass http://backend$1;
    #}
    location @proxy_origin {
    #resolver 10.196.160.160;
    #proxy_buffering on;
    #proxy_buffer_size 4096k;
    #proxy_buffers 5 4096k;
    proxy_pass http://backend$1;
    proxy_cache_valid 404 3s;
    proxy_cache_methods GET HEAD;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_read_timeout 10s;
    proxy_send_timeout 10s;
    proxy_connect_timeout 10s;
    proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
    proxy_cache_background_update on;
    proxy_cache_lock on;
    #proxy_temp_path "/mnt/Delta/nginx_cache/nginx2/tmp";
    #proxy_store "/mnt/Delta/nginx_cache/nginx2/tmp/$request_uri";
    #proxy_store_access user:rw group:rw all:r;
    #proxy_method GET;
    proxy_set_header Host $host;
    proxy_ignore_headers "Set-Cookie";
    proxy_hide_header "Set-Cookie";
    add_header X-Proxy-Cache $upstream_cache_status;
    add_header Host Nginx5;
    }

    }









    share|improve this question









    New contributor




    Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I'm using 5 nginx servers as a reverse proxy to my origin. My origin only sends out HLS content, so .ts, .aac, .vtt and .m3u8 files.



      This is working really well for the most part, but when I have about 8k - 12k active connections, making around 150rq/s I start to see degraded performance.



      The largest files that I serve are around 3M, or 2.5mbps.



      I'm hoping to figure out a way to allow more active connections or at least have 12k connections without degraded performance.



      user  nginx;
      worker_processes 8;
      worker_priority -15;
      worker_rlimit_nofile 1048576;

      #error_log logs/error.log;
      #error_log logs/error.log notice;
      #error_log logs/error.log info;
      #pid logs/nginx.pid;

      events {
      worker_connections 1048576;
      multi_accept on;
      use epoll;
      }


      http {
      include mime.types;
      default_type application/octet-stream;

      log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
      error_log /var/log/nginx/error.log warn;
      access_log /var/log/nginx/access.log main_ext;
      access_log syslog:server=unix:/dev/log,tag=amplify,severity=info main_ext;
      sendfile on;
      #tcp_nopush on;
      #tcp_nodelay on;

      keepalive_timeout 120;
      keepalive_requests 100000;
      connection_pool_size 8192;

      #gzip on;
      open_file_cache max=400000 inactive=30s;
      open_file_cache_errors off;
      open_file_cache_min_uses 1;
      open_file_cache_valid 60s;

      include /etc/nginx/conf.d/*.conf;

      server {
      listen 80;
      server_name localhost;

      #charset koi8-r;

      #access_log logs/host.access.log main;

      #location / {
      # root html;
      # index index.html index.htm;
      #}


      location /nginx_status {
      stub_status on;
      allow 127.0.0.1;
      deny all;
      }

      #error_page 404 /404.html;

      # redirect server error pages to the static page /50x.html
      #
      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
      root html;
      }

      # proxy the PHP scripts to Apache listening on 127.0.0.1:80
      #
      #location ~ .php$ {
      # proxy_pass http://127.0.0.1;
      #}

      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      #location ~ .php$ {
      # root html;
      # fastcgi_pass 127.0.0.1:9000;
      # fastcgi_index index.php;
      # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
      # include fastcgi_params;
      #}

      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      #location ~ /.ht {
      # deny all;
      #}
      }


      # another virtual host using mix of IP-, name-, and port-based configuration
      #
      #server {
      # listen 8000;
      # listen somename:8080;
      # server_name somename alias another.alias;

      # location / {
      # root html;
      # index index.html index.htm;
      # }
      #}


      # HTTPS server
      #
      #server {
      # listen 443 ssl;
      # server_name localhost;

      # ssl_certificate cert.pem;
      # ssl_certificate_key cert.key;

      # ssl_session_cache shared:SSL:1m;
      # ssl_session_timeout 5m;

      # ssl_ciphers HIGH:!aNULL:!MD5;
      # ssl_prefer_server_ciphers on;

      # location / {
      # root html;
      # index index.html index.htm;
      # }
      #}

      }


      and



      upstream backend {
      ip_hash;
      keepalive 100;
      server server1;
      server server2;
      }

      proxy_cache_path "/mnt/Delta/nginx_cache/nginx5/tmp/" levels=1:2 keys_zone=hls:10m inactive=2h use_temp_path=off;
      proxy_cache hls;
      proxy_cache_min_uses 1;

      server {
      listen 80;
      #server_name localhost;


      location = /healthz {
      return 200;
      access_log off;
      }

      location / {
      root /mnt/Delta/nginx_cache;
      try_files $request_uri @proxy_origin;
      }
      # location ~* .(mpd)$ {
      # rewrite /middle/([^/]+)/$1 break;
      # proxy_cache off;
      # expires -1;
      # proxy_pass http://backend$1;
      # }
      location ~* .(m3u8)$ {
      rewrite /middle/([^/]+)/$1 break;
      #proxy_cache off;
      #expires -1;
      proxy_cache_valid 200 302 5s;
      proxy_ignore_headers "Set-Cookie";
      proxy_hide_header "Set-Cookie";
      add_header X-Proxy-Cache $upstream_cache_status;
      add_header Host Nginx5;
      proxy_buffering on;
      proxy_buffer_size 1024k;
      proxy_buffers 5 1024k;
      proxy_pass http://backend$1;
      }
      #location ~* .(ts)$ {
      # root /mnt/Delta/nginx_cache/tmp;
      # try_files $request_uri @proxy_origin;
      # proxy_pass http://backend$1;
      #}
      location @proxy_origin {
      #resolver 10.196.160.160;
      #proxy_buffering on;
      #proxy_buffer_size 4096k;
      #proxy_buffers 5 4096k;
      proxy_pass http://backend$1;
      proxy_cache_valid 404 3s;
      proxy_cache_methods GET HEAD;
      proxy_redirect off;
      proxy_http_version 1.1;
      proxy_read_timeout 10s;
      proxy_send_timeout 10s;
      proxy_connect_timeout 10s;
      proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
      proxy_cache_background_update on;
      proxy_cache_lock on;
      #proxy_temp_path "/mnt/Delta/nginx_cache/nginx2/tmp";
      #proxy_store "/mnt/Delta/nginx_cache/nginx2/tmp/$request_uri";
      #proxy_store_access user:rw group:rw all:r;
      #proxy_method GET;
      proxy_set_header Host $host;
      proxy_ignore_headers "Set-Cookie";
      proxy_hide_header "Set-Cookie";
      add_header X-Proxy-Cache $upstream_cache_status;
      add_header Host Nginx5;
      }

      }









      share|improve this question









      New contributor




      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm using 5 nginx servers as a reverse proxy to my origin. My origin only sends out HLS content, so .ts, .aac, .vtt and .m3u8 files.



      This is working really well for the most part, but when I have about 8k - 12k active connections, making around 150rq/s I start to see degraded performance.



      The largest files that I serve are around 3M, or 2.5mbps.



      I'm hoping to figure out a way to allow more active connections or at least have 12k connections without degraded performance.



      user  nginx;
      worker_processes 8;
      worker_priority -15;
      worker_rlimit_nofile 1048576;

      #error_log logs/error.log;
      #error_log logs/error.log notice;
      #error_log logs/error.log info;
      #pid logs/nginx.pid;

      events {
      worker_connections 1048576;
      multi_accept on;
      use epoll;
      }


      http {
      include mime.types;
      default_type application/octet-stream;

      log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
      error_log /var/log/nginx/error.log warn;
      access_log /var/log/nginx/access.log main_ext;
      access_log syslog:server=unix:/dev/log,tag=amplify,severity=info main_ext;
      sendfile on;
      #tcp_nopush on;
      #tcp_nodelay on;

      keepalive_timeout 120;
      keepalive_requests 100000;
      connection_pool_size 8192;

      #gzip on;
      open_file_cache max=400000 inactive=30s;
      open_file_cache_errors off;
      open_file_cache_min_uses 1;
      open_file_cache_valid 60s;

      include /etc/nginx/conf.d/*.conf;

      server {
      listen 80;
      server_name localhost;

      #charset koi8-r;

      #access_log logs/host.access.log main;

      #location / {
      # root html;
      # index index.html index.htm;
      #}


      location /nginx_status {
      stub_status on;
      allow 127.0.0.1;
      deny all;
      }

      #error_page 404 /404.html;

      # redirect server error pages to the static page /50x.html
      #
      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
      root html;
      }

      # proxy the PHP scripts to Apache listening on 127.0.0.1:80
      #
      #location ~ .php$ {
      # proxy_pass http://127.0.0.1;
      #}

      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      #location ~ .php$ {
      # root html;
      # fastcgi_pass 127.0.0.1:9000;
      # fastcgi_index index.php;
      # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
      # include fastcgi_params;
      #}

      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      #location ~ /.ht {
      # deny all;
      #}
      }


      # another virtual host using mix of IP-, name-, and port-based configuration
      #
      #server {
      # listen 8000;
      # listen somename:8080;
      # server_name somename alias another.alias;

      # location / {
      # root html;
      # index index.html index.htm;
      # }
      #}


      # HTTPS server
      #
      #server {
      # listen 443 ssl;
      # server_name localhost;

      # ssl_certificate cert.pem;
      # ssl_certificate_key cert.key;

      # ssl_session_cache shared:SSL:1m;
      # ssl_session_timeout 5m;

      # ssl_ciphers HIGH:!aNULL:!MD5;
      # ssl_prefer_server_ciphers on;

      # location / {
      # root html;
      # index index.html index.htm;
      # }
      #}

      }


      and



      upstream backend {
      ip_hash;
      keepalive 100;
      server server1;
      server server2;
      }

      proxy_cache_path "/mnt/Delta/nginx_cache/nginx5/tmp/" levels=1:2 keys_zone=hls:10m inactive=2h use_temp_path=off;
      proxy_cache hls;
      proxy_cache_min_uses 1;

      server {
      listen 80;
      #server_name localhost;


      location = /healthz {
      return 200;
      access_log off;
      }

      location / {
      root /mnt/Delta/nginx_cache;
      try_files $request_uri @proxy_origin;
      }
      # location ~* .(mpd)$ {
      # rewrite /middle/([^/]+)/$1 break;
      # proxy_cache off;
      # expires -1;
      # proxy_pass http://backend$1;
      # }
      location ~* .(m3u8)$ {
      rewrite /middle/([^/]+)/$1 break;
      #proxy_cache off;
      #expires -1;
      proxy_cache_valid 200 302 5s;
      proxy_ignore_headers "Set-Cookie";
      proxy_hide_header "Set-Cookie";
      add_header X-Proxy-Cache $upstream_cache_status;
      add_header Host Nginx5;
      proxy_buffering on;
      proxy_buffer_size 1024k;
      proxy_buffers 5 1024k;
      proxy_pass http://backend$1;
      }
      #location ~* .(ts)$ {
      # root /mnt/Delta/nginx_cache/tmp;
      # try_files $request_uri @proxy_origin;
      # proxy_pass http://backend$1;
      #}
      location @proxy_origin {
      #resolver 10.196.160.160;
      #proxy_buffering on;
      #proxy_buffer_size 4096k;
      #proxy_buffers 5 4096k;
      proxy_pass http://backend$1;
      proxy_cache_valid 404 3s;
      proxy_cache_methods GET HEAD;
      proxy_redirect off;
      proxy_http_version 1.1;
      proxy_read_timeout 10s;
      proxy_send_timeout 10s;
      proxy_connect_timeout 10s;
      proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
      proxy_cache_background_update on;
      proxy_cache_lock on;
      #proxy_temp_path "/mnt/Delta/nginx_cache/nginx2/tmp";
      #proxy_store "/mnt/Delta/nginx_cache/nginx2/tmp/$request_uri";
      #proxy_store_access user:rw group:rw all:r;
      #proxy_method GET;
      proxy_set_header Host $host;
      proxy_ignore_headers "Set-Cookie";
      proxy_hide_header "Set-Cookie";
      add_header X-Proxy-Cache $upstream_cache_status;
      add_header Host Nginx5;
      }

      }






      nginx video-streaming reverse-proxy hls






      share|improve this question









      New contributor




      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 1 hour ago







      Sonic Motion













      New contributor




      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 hour ago









      Sonic MotionSonic Motion

      11




      11




      New contributor




      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Sonic Motion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Sonic Motion is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1419213%2fnxing-hls-reverse-proxy%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Sonic Motion is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Sonic Motion is a new contributor. Be nice, and check out our Code of Conduct.













          Sonic Motion is a new contributor. Be nice, and check out our Code of Conduct.












          Sonic Motion is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1419213%2fnxing-hls-reverse-proxy%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

          Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

          Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...