nginx+apache+geoip HOWTO use REMOTE_ADDR

I want use REMOTE_ADDR in binding NGINX+APACHE, thank very much Andrey Chernomyrdin, for it we should use a few nginx directives + mod_rpaf for APACHE.

1. For DEBIAN (Ubuntu)

apt-get update
apt-get install geoip-bin
apt-get install libapache2-mod-geoip
apt-get install libapache2-mod-rpaf

2. Open nginx host config file and add into it following :

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

3. A litle miracle which help me with GEOIP :

cd /etc/apache2/mods-enabled/

and rename symlink rpaf.conf & rpaf.load to

000.rpaf.conf
000.rpaf.load