You should add proxy_http_version 1.1
,
This directive appeared in version 1.1.4.
Sets the HTTP protocol version for proxying. By default, version 1.0 is used. Version 1.1 is recommended for use with keepalive connections and NTLM authentication.
Best way, Create a http_proxy.conf
file and include it in your server config:
## http_proxy.conf
proxy_buffers 32 4k;
proxy_http_version 1.1;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_set_header Connection '';
#proxy_set_header HEADER_NAME $VALUE;
## server.conf
server {
listen 80;
server_name example.domain.com
include /etc/nginx/http_proxy.conf;
#.....
}