I have multiple servers behind a load balancer, I am trying to deny access to certain files unless you come from our buildings IP Address. I have tried a number of different things but I cannot seem to make this work. The servers are Rackspace Cloud Servers behind a Rackspace Load Balancer. I am using .htaccess for the sites and have tried the following.
Deny from all
SetEnvIF X-Forwarded-For "x.x.x.x" AllowIP
SetEnvIF X-Forwarded-For "y.y.y.y" AllowIP
Allow from env=AllowIP
So I guess the question has a couple of parts
1. Is the above the right way to do this?
2. Since it isn't working (I get denied as well as everyone else) how do tell if X-Forwarded-For is being set and see what format it is in?
3. If the above isn't the right way to do this, what is?
Thanks for your help