proxy_pass to backend (varnish): delivered ip?

revirii nginx-forum at nginx.us
Wed Jan 30 16:13:38 UTC 2013


Hey,

thx for the fast answer :-)

> The connection to varnish comes from the address 127.0.0.1. That's
> what it logs here.

> The connection to varnish comes from the address 192.168.0.1. That's
> what it logs here.

But why? The only difference is the proxy_pass statement:

proxy_pass http://127.0.0.1:80;
vs.
proxy_pass http://192.168.0.1:80;

No other changes were done, and no changes in varnish config.

> varnish could see the "true" remote_addr in the X-Real-IP: http header
> that you send, if it looked there.
>
> If you want varnish to log the contents of that header, or to log that
> instead of what it sees as the connecting ip address, you'll be better
> off to ask in a place where people know varnish.

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? :-/


revirii

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,235737,235739#msg-235739



More information about the nginx mailing list