proxy_http_version 1.1;
proxy_set_header Connection "";
Allows proxying requests with NTLM Authentication. The upstream connection is bound to the client connection once the client sends a request with the “Authorization” header field value starting with “Negotiate” or “NTLM”. Further client requests will be proxied through the same upstream connection, keeping the authentication context.

In order for NTLM authentication to work, it is necessary to enable keepalive connections to upstream servers. The proxy_http_version directive should be set to “1.1” and the “Connection” header field should be cleared:

Module ngx_http_upstream_module (nginx.org)

nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 简书 (jianshu.com)

 

NGINX + TOMCAT出现大量的TIME-WAIT状态的TCP连接解决 - 小海bug的个人空间 - OSCHINA - 中文开源技术交流社区

upstream http_backend {
    server 127.0.0.1:8080;

    keepalive 16;
}

server {
    ...

    location /http/ {
        proxy_pass http://http_backend;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        ...
    }
}

 

用一个例子来演示会更加清晰