Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

Sure it's possible.

Just install mod_rpaf. Configure apache as follows:

LoadModule rpaf_module libexec/apache2/mod_rpaf-2.0.so

RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1 10.0.0.1
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

 
discard

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.