Forum: NGINX GEOIP not honoring REALIP_MODULE

Posted by syle (Guest)
on 2010-08-31 17:10
(Received via mailing list)
It is assumed when we use REALIP_MODULE and purposely set REMOTE_ADDR to
real ip of our proxies in front
that this is the real client IP that GEOIP should be using.

example:
proxy of nginx in front of a fastcgi nginx.

Proxy config:
        proxy_set_header        Host            $host;
        proxy_set_header        X-Real-IP       $remote_addr;
        proxy_set_header        X-Forwarded-For
$proxy_add_x_forwarded_for;

Fast cgi config:
real_ip_header     X-Real-IP;
set_real_ip_from  x.x.x.x;

This ends up setting REMOTE_ADDR correctly for Fastcgi nginx server, but
GEOIP parses information for
proxy connecting IP instead giving false information.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,125676,125676#msg-125676
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.