Passing through client IP address to server

ADOFMS Admin, SteveOC admin at
Fri Jun 8 08:01:31 CEST 2007

Kenneth Rørvik wrote:
> ADOFMS Admin, SteveOC wrote:
>> Im running both Varnish and my LAMP application on the same machine, so
>> all requests hitting the apache server now have an incoming IP address
>> of
>> Is there something that I can do in VCL to set the client IP address
>> that apache sees as being the real client IP address ?
>> My PHP app has a requirement to record both client IP address,
>> timestamp, and browser version for all accesses to the system, so I
>> eventually need to make this happen.
> Take a look at the X-Forwarded-for header.
Brilliant !! 

Got it now, didnt notice that being set before. but that will do the trick.

There is also a HTTP_X_VIA being set sometimes, which reports the
hostname of the client machine. This variable isnt set on every request

There is also a HTTP_X_VARNISH variable set as well, which is just a
number.  Any idea what this one does ?

More information about the varnish-misc mailing list