<div dir="ltr"><div>Thanks for reply Francis, adding following did the trick :)<br><br>set req.http.X-Forwarded-For = req.http.X-Forwarded-For;<br>set req.http.X-GeoIP = geoip.country_code(req.http.X-Forwarded-For);<br><br><br></div>Regards.<br>Shahzaib<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 12:06 AM, Francis Daly <span dir="ltr"><<a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jan 20, 2015 at 11:38:21PM +0500, shahzaib shahzaib wrote:<br>
<br>
Hi there,<br>
<span class=""><br>
>     We've compile varnish with geoip module in order to cache country based<br>
> hashes, so far varnish<-> apache structure is working fine with geoip<br>
> module and caching requests based on countries but when we add another<br>
> Nginx proxy layer in front of varnish i.e nginx -> varnish - apache, the<br>
> geoip module stop tracking Country hashes and varnish shows following logs :<br>
<br>
</span>It sounds like you need to do whatever it takes to convince varnish's<br>
geoip module to use the IP address in the X-Real-IP header, and not the<br>
actual client address.<br>
<br>
Check the varnish geoip module documentation.<br>
<span class="HOEnZb"><font color="#888888"><br>
        f<br>
--<br>
Francis Daly        <a href="mailto:francis@daoine.org">francis@daoine.org</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div>