Welcome! Log In Create A New Profile

Advanced

Re: proxy_pass to backend (varnish): delivered ip?

Axel
January 30, 2013 11:24AM
Hello,

Am 30.01.2013 17:13, schrieb revirii:

>> varnish could see the "true" remote_addr in the X-Real-IP: http
>> header
>> that you send, if it looked there.
>
> Hm, would be interesting which param varnish checks. It can't be
> $remote_addr, so it has to be the address nginx proxies to (127.0.01
> or
> 192.168.0.1). Very strange. So it seems to be a varnish problem? :-/

You can see the right X-Forwarded-For header with tcpdump.

Take a look at the log format varnish uses. I don't know how to
configure varnish, but with Apache you have to change your LogFormat
from

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined

to something like

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b
\"%{Referer}i\"\"%{User-Agent}i\"" nginx

rgds, Axel

--
Never argue with an idiot; people watching may not tell the difference

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_pass to backend (varnish): delivered ip?

revirii January 30, 2013 10:33AM

Re: proxy_pass to backend (varnish): delivered ip?

Francis Daly January 30, 2013 10:54AM

Re: proxy_pass to backend (varnish): delivered ip?

revirii January 30, 2013 11:13AM

Re: proxy_pass to backend (varnish): delivered ip?

Francis Daly January 30, 2013 11:22AM

Re: proxy_pass to backend (varnish): delivered ip?

revirii January 31, 2013 02:13AM

Re: proxy_pass to backend (varnish): delivered ip?

Francis Daly January 31, 2013 06:48AM

Re: proxy_pass to backend (varnish): delivered ip?

Axel January 30, 2013 11:24AM

Re: proxy_pass to backend (varnish): delivered ip?

revirii January 31, 2013 01:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 111
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready