Re: Ip Address
Jack Tuhman skrev: > > We have a very old webapp that has an embedded server. We have put > varnish in front of it to help with load while we rewrite it. However, > it is detecting the IP address of the varnish box rather then the > client. I know that in apache, we can fix this by looking at > HTTP_X_FORWARDED_FOR, however, our old app does not let us do that. Is > there anything we can do in varnish to pass the real ip in the > REMOTE_ADDR server var? The REMOTE_ADDR server variable is set locally on the web server. So, unless you can write some custom code to override REMOTE_ADDR you are out of luck. :-( Per. signature.asc Description: OpenPGP digital signature ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Ip Address
Hi all, We have a very old webapp that has an embedded server. We have put varnish in front of it to help with load while we rewrite it. However, it is detecting the IP address of the varnish box rather then the client. I know that in apache, we can fix this by looking at HTTP_X_FORWARDED_FOR, however, our old app does not let us do that. Is there anything we can do in varnish to pass the real ip in the REMOTE_ADDR server var? Thanks! ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Forward client IP address
I'm impressed. Really quick answer. Thank you! Regards On 21 feb 2008, at 13.37, Stig Sandbeck Mathisen wrote: Fredrik Nygren <[EMAIL PROTECTED]> writes: > I'm running Varnish 1.1.2 with Apache at the backend. When I follow > Apaches access logs all incoming clients have the same IP-number, > the IP-number of my Varnish server of course. How do I forward the > IP- number of an incoming request from Varnish to Apaches access > logs? Is it possible? I've added a recipe for this to the FAQ, see http://varnish.projects.linpro.no/wiki/FAQ#HowcanIlogtheclientIPaddressonthebackend (nice long url) -- Stig Sandbeck Mathisen, Linpro ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Forward client IP address
Fredrik Nygren <[EMAIL PROTECTED]> writes: > I'm running Varnish 1.1.2 with Apache at the backend. When I follow > Apaches access logs all incoming clients have the same IP-number, > the IP-number of my Varnish server of course. How do I forward the > IP- number of an incoming request from Varnish to Apaches access > logs? Is it possible? I've added a recipe for this to the FAQ, see http://varnish.projects.linpro.no/wiki/FAQ#HowcanIlogtheclientIPaddressonthebackend (nice long url) -- Stig Sandbeck Mathisen, Linpro ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Forward client IP address
On Thursday 21 February 2008 11:39:30 Fredrik Nygren wrote: > Hi, > I'm running Varnish 1.1.2 with Apache at the backend. When I follow > Apaches access logs all incoming clients have the same IP-number, the > IP-number of my Varnish server of course. How do I forward the IP- > number of an incoming request from Varnish to Apaches access logs? Is > it possible? the originating IP address will be forwarded by varnish to you backend in the X-Forward-for header. search the archives and the net for X-Forward-for and you find (among others) mod_extract_forwarded > > Regards > > > ___ > varnish-misc mailing list > varnish-misc@projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Forward client IP address
Hi, I'm running Varnish 1.1.2 with Apache at the backend. When I follow Apaches access logs all incoming clients have the same IP-number, the IP-number of my Varnish server of course. How do I forward the IP- number of an incoming request from Varnish to Apaches access logs? Is it possible? Regards ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: how to leave logging real ip address?
"Monty Ree" <[EMAIL PROTECTED]> writes: > After I have set varnish based cache, all ip address which is logged > at realserver, are only cache ip address. I guess this is a normal, > but is there any method or way that leaving real ip address at log > file? Use the Varnish log instead. Remember, your backend will only log cache misses, so backend logs are useless for traffic stats. DES -- Dag-Erling Smørgrav Senior Software Developer Linpro AS - www.linpro.no ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: how to leave logging real ip address?
there is module mod_rpaf for Apache. you might want to take a look at it. http://stderr.net/apache/rpaf/ -- janis On Wednesday 17 October 2007 07:42, Luke Macpherson wrote: > You probably want to log the X-Forwarded-for header on the http server. > > On 10/17/07, Monty Ree <[EMAIL PROTECTED]> wrote: > > Hello, all. > > > > > > After I have set varnish based cache, all ip address which is logged at > > realserver, are only cache ip address. > > I guess this is a normal, but is there any method or way that leaving > > real ip address at log file? > > > > > > Thanks for your help in advance. > > > > _ > > 메신저에서 문자를 바로 보내보세요 http://phonebuddy.msn.co.kr/ > > > > ___ > > varnish-misc mailing list > > varnish-misc@projects.linpro.no > > http://projects.linpro.no/mailman/listinfo/varnish-misc > > ___ > varnish-misc mailing list > varnish-misc@projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: how to leave logging real ip address?
You probably want to log the X-Forwarded-for header on the http server. On 10/17/07, Monty Ree <[EMAIL PROTECTED]> wrote: > Hello, all. > > > After I have set varnish based cache, all ip address which is logged at > realserver, are only cache ip address. > I guess this is a normal, but is there any method or way that leaving real > ip address at log file? > > > Thanks for your help in advance. > > _ > 메신저에서 문자를 바로 보내보세요 http://phonebuddy.msn.co.kr/ > > ___ > varnish-misc mailing list > varnish-misc@projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-misc > ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
how to leave logging real ip address?
Hello, all. After I have set varnish based cache, all ip address which is logged at realserver, are only cache ip address. I guess this is a normal, but is there any method or way that leaving real ip address at log file? Thanks for your help in advance. _ 메신저에서 문자를 바로 보내보세요 http://phonebuddy.msn.co.kr/ ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Passing through client IP address to server
"ADOFMS Admin, SteveOC" <[EMAIL PROTECTED]> writes: > 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 > though. X-Via most likely comes from a downstream cache, possibly a client-side Squid cache or something similar. > There is also a HTTP_X_VARNISH variable set as well, which is just a > number. Any idea what this one does ? It is a reference to the internal request ID, which is recorded in the log file. For a cache hit, X-Varnish will contain both the ID of the current request and the ID of the request that populated the cache. It makes debugging Varnish a *lot* easier. DES -- Dag-Erling Smørgrav Senior Software Developer Linpro AS - www.linpro.no ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Passing through client IP address to server
- ADOFMS Admin, SteveOC <[EMAIL PROTECTED]> wrote: > There is also a HTTP_X_VARNISH variable set as well, which is just a > number. Any idea what this one does ? This number is a request number you can use for debugging. varnishlog outputs these identifiers and you can cross check with the number from the header. Regards -- Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS http://www.startsiden.no ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Passing through client IP address to server
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 127.0.0.1. >> >> 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 though. There is also a HTTP_X_VARNISH variable set as well, which is just a number. Any idea what this one does ? ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Passing through client IP address to server
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 127.0.0.1. > > 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. -- Kenneth Rørvik, IT HiO Tlf 22 45 20 83 [EMAIL PROTECTED] ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Passing through client IP address to server
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 127.0.0.1. 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. Thnks SteveOC Apologies if this topic has been covered before - Ive done a good search using google, and couldnt find an answer to this one .. thanks. ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc