Welcome! Log In Create A New Profile

Advanced

http keep alive with post requests issue

October 13, 2014 06:07AM
Hi,

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?
Subject Author Posted

http keep alive with post requests issue

lzilles October 13, 2014 06:07AM

Re: http keep alive with post requests issue

lzilles October 13, 2014 10:48AM

Re: http keep alive with post requests issue

Valentin V. Bartenev October 13, 2014 06:06PM

Re: http keep alive with post requests issue

lzilles October 14, 2014 03:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready