Welcome! Log In Create A New Profile

Advanced

Re: Geoip issue with nginx in front of varnish and apache !

January 20, 2015 03:06PM
Thanks for reply Francis, adding following did the trick :)

set req.http.X-Forwarded-For = req.http.X-Forwarded-For;
set req.http.X-GeoIP = geoip.country_code(req.http.X-Forwarded-For);


Regards.
Shahzaib

On Wed, Jan 21, 2015 at 12:06 AM, Francis Daly <francis@daoine.org> wrote:

> On Tue, Jan 20, 2015 at 11:38:21PM +0500, shahzaib shahzaib wrote:
>
> Hi there,
>
> > We've compile varnish with geoip module in order to cache country
> based
> > hashes, so far varnish<-> apache structure is working fine with geoip
> > module and caching requests based on countries but when we add another
> > Nginx proxy layer in front of varnish i.e nginx -> varnish - apache, the
> > geoip module stop tracking Country hashes and varnish shows following
> logs :
>
> It sounds like you need to do whatever it takes to convince varnish's
> geoip module to use the IP address in the X-Real-IP header, and not the
> actual client address.
>
> Check the varnish geoip module documentation.
>
> f
> --
> Francis Daly francis@daoine.org
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Geoip issue with nginx in front of varnish and apache !

shahzaib1232 January 20, 2015 01:40PM

Re: Geoip issue with nginx in front of varnish and apache !

Francis Daly January 20, 2015 02:08PM

Re: Geoip issue with nginx in front of varnish and apache !

shahzaib1232 January 20, 2015 03:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready