This should be helpful. http://www.daveperrett.com/articles/2009/08/10/passing-ips-to-apache-with-nginx-proxy/
The issue is with Apache not accepting the real IP address from Nginx. On Tue, Jun 18, 2013 at 5:39 AM, Володя К. <vova-...@yandex.ua> wrote: > Hi,I have Server version: Apache/2.4.4 (Ubuntu) and nginx > and I try setup mod_remoteip but without success. > > I did next steps: > 1. enable and configure mod_remoteip module > # cat remoteip.conf > RemoteIPHeader X-Forwarded-For > RemoteIPTrustedProxy 212.12.x.x > > # cat remoteip.load > LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so > > 2. change LogFormat directive to > LogFormat "%a %{host}i %l %u %D %T %{pid}P %t \"%r\" %>s %O > \"%{Referer}i\" \"%{User-Agent}i\"" combined > > (changed %h -> %a ) > > 3. In nginx.conf i have > ... > proxy_pass http://212.12.x.x:81; > proxy_redirect http://212.12.x.x:81/ /; > proxy_set_header Host $host; > proxy_set_header X-Forwarded-For > $proxy_add_x_forwarded_for; > proxy_set_header X-Forwarded-Proto $scheme; > proxy_set_header X-Real-IP $remote_addr; > ... > > > After this I can see real IP addresses in apache logs, but /server-status/ > page shows only frontend (nginx) IP-address 212.12.x.x > > Can somebody help me to see real IP-addresses in server-status page ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > > -- Take Care, David Guerra http://frustratedtech.com/