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've got nginx configured to do SSL termination for an apache webserver. It seems to be working, however all requests going to the webserver appear to be coming from the nginx server and not the original ip address. Is it possible for those to come through intact?

share|improve this question

Sure it's possible.

Just install mod_rpaf. Configure apache as follows:

LoadModule rpaf_module libexec/apache2/

RPAFenable On
RPAFsethostname On
RPAFheader X-Forwarded-For

Where RPAFproxy_ips are the IP address(es) of your nginx reverse proxy.

Nginx needs to be configured to set the X-Forwarded-For header as well:

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
share|improve this answer

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.