Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just upgraded from apache2.2 to apache2.4, suddly Remote_Addr prints instead of client ip. I have apache behaind nginx with the following settings:

                proxy_redirect off;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_connect_timeout 60;
                proxy_send_timeout 60;
                proxy_read_timeout 60;
share|improve this question
up vote 1 down vote accepted

If I've read your question correctly you have:

 internet -> nginx -> apache

If you want the Apache PHP/access.log/CGI environments to show the requesting (external) IP then you want to use mod_rpaf.

NOTE: If you've upgraded mod_rpaf recently you might find it doesn't work, due to this bug:

share|improve this answer
it always worked without this module prior to upgrade ... – dvrecmfo Oct 11 '13 at 22:51
Are you sure? nginx will set the headers, but Apache won't know about them. If you have magic-code that checks the headers I could believe it, but most code just uses ENV{'REMOTE_ADDR'} and apache won't update that without mod_rpaf, or mod_headers. – Steve Kemp Oct 11 '13 at 22:58
now we have an internal module called ` remoteip_module ` adding the following to httpd.conf fixed the problem. RemoteIPHeader X-Forwarded-For RemoteIPInternalProxy – dvrecmfo Oct 11 '13 at 23:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.