We're currently using Lighttpd with FastCGI to serve PHP to our clients. We recently added load balancing through RackSpace Cloud to help us handle our traffic however, the client's IP is now the load balancer IP. All traffic is through HTTPS.
We've enabled mod_extforward and have tried all different configuration for with using our LB IP and the different headers ("X-Forwarded-For","Forwarded-For","X-Cluster-Client-Ip") and we cannot seem to get this to work!
Any ideas? Thank you!
If you're using Rackspace's Cloud Load Balancers, you won't be able to get the client's IP address over SSL.
For plain HTTP, the balancers can do intelligent things (the "service unavailable" page, X-Forwarded-for, etc.) However, the load balancers can't do anything other than ferry bytes between the client and server over HTTPS, because, without the private key, there's no way to modify the stream (other than making it invalid.)
Someone asked this question on the Rackspace forums a little while ago.
According to Rackspace, SSL Termination should not be used if your web application is transmitting Personal Identifiable Information (PII)
http://www.rackspace.com/knowledge_center/product-faq/cloud-load-balancers
I'm having to resort to setting the client's IP in a cookie. The cookie is set in javascript. The client's IP is obtained by making a jsonp call to a server (not behind a load balancer) that provide's the client's public IP. This is all I can think of where I can still utilize Rackspace's Cloud Load Balancer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With