Welcome! Log In Create A New Profile

Advanced

the $upstream_addr variable is empty when enable keepalive

April 25, 2012 10:12PM
hi,

from nginx 1.1.13 to 1.2.0.
the conf:

upstream a {
server 127.0.0.1:8083;
keepalive 10 single;
}
server {
listen 8083;
keepalive_timeout 10;

location = /a {
}
location = /b {
proxy_http_version 1.1;
proxy_set_header Connection keep-alive;
add_header upname "abc[$upstream_addr]dd";
proxy_pass http://a/a;
}
}

- - - - - - - - -
$ touch html/a

$ curl -i localhost:8083/b
HTTP/1.1 200 OK
Server: nginx/1.2.0
Date: Thu, 26 Apr 2012 02:07:12 GMT
Content-Type: application/octet-stream
Content-Length: 0
Connection: keep-alive
Last-Modified: Thu, 26 Apr 2012 02:01:02 GMT
Accept-Ranges: bytes
upname: abc[127.0.0.1:8083]dd

$ curl -i localhost:8083/b
HTTP/1.1 200 OK
Server: nginx/1.2.0
Date: Thu, 26 Apr 2012 02:07:12 GMT
Content-Type: application/octet-stream
Content-Length: 0
Connection: keep-alive
Last-Modified: Thu, 26 Apr 2012 02:01:02 GMT
Accept-Ranges: bytes
upname: abc[]dd



--

林青(Kindy Lin)
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

the $upstream_addr variable is empty when enable keepalive

kindy 2232 April 25, 2012 10:12PM

Re: the $upstream_addr variable is empty when enable keepalive

Maxim Dounin 733 April 26, 2012 08:36AM

Re: the $upstream_addr variable is empty when enable keepalive

kindy 888 May 10, 2012 09:52PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 155
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