Author Topic: Howto: Configure client-ip reporting in Apache when running behind Varnish  (Read 3323 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
When you install Varnish (cache server), all your websites will be served first by varnish. Apache logs will see client ip as 127.0.0.1.

Concerns:
Modules that depend on client ip / filtering breaks. eg. mod_spamhaus

Solution:
There is this module mod_extract_forwarded. This has been build for Apache 2.0 but it works for Apache 2.2.17 of CWP too.

Instructions:
http://share.ashokjp.com/linux/varnish-apache-and-client-ip-reporting-for-mod_spamhaus.html

I have compiled instructions to get this working on a CWP server. It works for me, still please try it at your own risk, make necessary backups before you try !! ::)
« Last Edit: November 26, 2014, 10:40:56 PM by ashokjp »

Offline
***
Re: Howto: Configure client-ip reporting in Apache when running behind Varnish
« Reply #1 on: November 04, 2015, 12:05:20 PM »
Has anyone tried this method on Apache 2.2.31 with Varnish 3.xx or maybe even mod_rpaf ?