[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-misc
Subject:    IP and mod_rpaf
From:       brian.pan () light-mc ! com (Brian Pan)
Date:       2008-09-10 14:44:57
Message-ID: 6616347254C43B4F98EB5C7C421BCAA1250983 () mail-33ps ! atlarge ! net
[Download RAW message or body]

Here's an apache module that might be useful for some people:

 

http://stderr.net/apache/rpaf/

 

It's similar to "mod_extracted_forward'.  It rewrites the remote_addr
for apache on the backend, so that Apache logs will see the client IP
address and not varnish server's address. 

 

I also added this to the .vcl as was recommended in the Varnish FAQ:

 

sub vcl_recv {
  # Add a unique header containing the client address
  remove req.http.X-Forwarded-For;
  set    req.http.X-Forwarded-For = client.ip;
  # [...]
}

 

It's also useful if you're using mod_bwshare - and are trying to
throttle usage by IP address. 

 

 

------

Brian Y. Pan

Light Management Consulting LLC

Princeton, NJ 08540   USA

 

Tel: +1 (609) 651-4779

Fax: +1 (609) 651-4799

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20080910/b41629d4/attachment.htm 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic