title: REMOTE_ADDR IP from user instead of Nginx reverse proxy server
body: <p>I already read a lot of posts about this topic and tried several solutions but did not find a working slotion.</p>
  
  <p>I have setup an Nginx reverse proxy in front of my Apache server. When my php application uses the <strong>REMOTE_ADDR</strong> function it gets the IP of the Nginx server instead off the user. </p>
  
  <p>I'm using <strong>Apache 2.4.10</strong>, so module_remoteip.c should be installed. But it is not loaded. </p>
  
  <p>Therefore I installed rpaf_module. It looks like this module is installed correctly, with phpinfo() mod_rpaf-2 is shown with the loaded modules. The I modified the <strong>/etc/apache2/mods-available/rpaf.conf</strong> file with the following content:</p>
  
  <pre><code>&lt;IfModule rpaf_module&gt;
      RPAFenable On
      RPAFsethostname On
      RPAFproxy_ips 172.19.0.5 # ip of Nginx server
      RPAFheader X-Forwarded-For
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>My Nginx configuration look like this:</p>
  
  <pre><code>location / {
      proxy_set_header X-Real-Ip $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $host;
      proxy_pass 172.19.0.4;
  }
  </code></pre>
  
  <p>Help is appreciated?</p>