Control Web Panel

WebPanel => Apache => Varnish => Topic started by: ashokjp on November 26, 2014, 09:20:06 PM

Title: Howto: Configure client-ip reporting in Apache when running behind Varnish
Post by: ashokjp on November 26, 2014, 09:20:06 PM
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 (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 !! ::)
Title: Re: Howto: Configure client-ip reporting in Apache when running behind Varnish
Post by: Glenn 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 ?