http keep alive with post requests issue

lzilles nginx-forum at
Mon Oct 13 10:07:05 UTC 2014


I am using nginx as proxy with an upstream configuration:

	upstream example_server {
		server localhost:9000 fail_timeout=0;
		keepalive 64;

Everything works fine when configuring location to include
proxy_http_version and connection header:

	location ... {
		send_timeout 300;
		client_body_buffer_size 1024k;
		proxy_read_timeout 300;

	        proxy_http_version 1.1;
	        proxy_set_header Connection "";

                proxy_pass http://example_server;

Responses for both HTTP GET and POST requests contain "keep-alive" and
"server nginx" headers.
However, when I try to set proxy_http_version and connection header within
server or http context instead of location, nginx will only proxy GET
requests.  Responses for any POST requests seem to be coming directly from
my application server (no keep-alive headers and server name contains
application server instead of nginx). What am I missing here?

Posted at Nginx Forum:,253936,253936#msg-253936

More information about the nginx mailing list