How to keep alive when upstream 2 internal server nginx

nguyenbatam90 nginx-forum at forum.nginx.org
Mon Mar 21 07:29:36 UTC 2016


This is my config and 
how i can keep alive request from port *:83 and port *:7082
http{
    upstream download_redirect {
        server 127.0.0.1:80 weight=1;
        keepalive 20;
    }


     server {
         listen       7082;
         server_name  localhost;

         location ~ ^/x-keam/service/v0.5/videos/stream(.*)$ {
              if ( $args ) {
                 return 307
http://111.30.211.144:8000/x-keam/service/v1.0/videos/stream$1?$args;
            }
            return 307
http://111.30.211.144:8000/x-keam/service/v1.0/videos/stream$1;
        }
    }

    server {
        listen          83;
        server_name     localhost;
        location ~ ^/x-keam/service/v0.5/videos/stream(.*)$ {
                proxy_pass http://download_redirect;
                proxy_http_version 1.1;
               proxy_set_header Connection "";
        }
    }

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,265524,265524#msg-265524



More information about the nginx mailing list