IP and mod_rpaf

Brian Pan brian.pan at light-mc.com
Wed Sep 10 16:44:57 CEST 2008

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




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: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20080910/b41629d4/attachment-0001.html>

More information about the varnish-misc mailing list