varnish 2.0.4 and new config changes
kristian at redpill-linpro.com
Wed Apr 8 10:53:53 CEST 2009
On Tue, Apr 07, 2009 at 05:29:23PM -0700, Jauder Ho wrote:
> On Tue, Apr 7, 2009 at 4:46 AM, Kristian Lyngstol <
> kristian at redpill-linpro.com> wrote:
> > On Tue, Apr 07, 2009 at 04:11:04AM -0700, Jauder Ho wrote:
> > > FYI, beresp.ttl does not work on varnish 2.0.4. It does work on -trunk
> > > though.
> > It would seem I was mistaken. It doesn't look like the obj to beresp
> > commits made it into 2.0.4 after a quick check. So that's only relevant to
> > trunk.
> That could be a problem for some people as obj.ttl is not available in
> vcl_fetch in 2.0.4 and beresp.ttl is not available until trunk.
That's not correct. Obj.ttl is available in hit, fetch, discard, timeout
and error in 2.0.4. It's only available in hit, discard, timeout and error
in trunk as beresp.ttl replaces it in fetch.
> > > Right now, only nginx1 sets X-Forwarded-For; varnish does not set
> > > X-Forwarded-For; nginx2 is a fastcgi frontend and does not set
> > > X-Forwarded-For.
> > >
> > > With this config (and using -trunk), nginx2 still logs the gateway IP so
> > > something strange is going on here.
> > I'm not familiar with how nginx logs, but I'd start by verifying:
> > 1. That the X-Forwarded-For does indeed reach the relevant server.
> > 2. That the entity that logs honors X-Forwarded-For.
> Looking at varnishlog (which covers the incoming request from nginx1 and
> response from nginx2.
> It looks like X-Forwarded-For is properly set on nginx1. However on the
> response, it looks like there are 2(?) X-Forwarded-For headers instead of
> being chained as in http://en.wikipedia.org/wiki/X-Forwarded-For#Format
Varnish doesn't touch these headers unless you tell it to, so it looks like
nginx is confused.
Redpill Linpro AS
Tlf: +47 21544179
Mob: +47 99014497
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the varnish-misc