We want to switch from mod_php to fastCGI + PHP-FPM on our Apache server.
We got everyhting in place and working except one thing:
Value in our $_SERVER['REMOTE_ADDR'] is always 127.0.0.1 not IP of client. Is there any way how to configure server to set this variable to client real IP?
We have client real IP in X-Forwarded-For header (passed from proxy)
Basically we need Apache alternative for nginx config:
fastcgi_param REMOTE_ADDR $http_x_forwarded_for;
( as described here Nginx replace REMOTE_ADDR with X-Forwarded-For)