GeoIP FirstNonPrivateXForwardedForIP

Steve Wilson lists-nginx at
Mon Jun 23 11:17:17 UTC 2014

On 23/06/2014 12:05, Keyur wrote:
> Thanks Jonathan!
> Well I can not comment regarding getting professional service. Infact I 
> will
> be glad to have support but If I go with this approach then I would 
> rather
> be asked to use web server which supports the said feature. (This is 
> doable
> in apache). And I really don't want to do away with Nginx.
> With lack of reply I understand this isn't possible in nginx at the 
> moment
> but I hope this is taken as feature request so that I can use it in 
> nginx
> and does not have to rely on other web server.

The chances are it's probably possible, however this mailing list/forum 
has a limited subset of nginx users available to assist.

I'm not sure why you have the requirement to use the XFF header to get 
geoip, but have you looked at the realip module 
<>. My first 
thought would be to configure it to ignore RFC1918 addresses so the real 
IP would in theory become a true IP which geoip could then use for 
locating the user.

I have a piwik install on nginx, behind varnish with another nginx 
instance doing SSL termination. Using realip to detect the user's 
location seems to have done the trick.


More information about the nginx mailing list