Welcome! Log In Create A New Profile

Advanced

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

Francis Daly
January 30, 2013 10:54AM
On Wed, Jan 30, 2013 at 10:33:25AM -0500, revirii wrote:

Hi there,

> The requests are sent to varnish, in the varnish logs i see them, they look
> like (shortened):
>
> 127.0.0.1 - - [30/Jan/2013:16:06:54 +0100] .........
>
> So varnish receives 127.0.0.1 from nginx, but i want varnish to receive the
> external ip.

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

> And now the requests in varnish log look like:
>
> 192.168.0.1 - - [30/Jan/2013:16:16:25 +0100] .........

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

> Well, where's the error? How can it be done that varnish receives the
> external ip (smth. like 84.156.23.145) from nginx? I suppose it's quite
> simple but i can't see it... :-/

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.

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready