title: nginx prepare set_proxy_header for php $_SERVER['REMOTE_ADDR']
body: <p>In nginx, how can you set up your <code>proxy_pass</code> so it sends to correct client remote ip address? Currently, only the server's ip shows up. I know that the proper way to do this is </p>
  
  <pre><code>proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $remote_addr;
  </code></pre>
  
  <p>However, on the other end I have a support system that is not written by me. I don't want to change all the code to fit the <code>X-Forwarded-For</code> parameter.</p>
  
  <p>How can I tell nginx to send the <code>$remote_addr</code> in the format so that it can be read with <code>$_SERVER['REMOTE_ADDR']</code>?</p>