nginx with fastcgi behind haproxy real client IP

vladimir simeonov

just add:

fastcgi_param REMOTE_ADDR $http_x_forwarded_for;

in the nginx.conf for your site and web apps will see the real IP of the client. 
It works where apps use only http_client_ip and ignore x-forwareded for which is 
sent correctly by upstream haproxy forwarder.

Comments are closed !