When an Apache HTTPD is used as a load balancer, is it possible to configure it on a way that all the requests are rejected except those coming from a specific host? What directive should be used?
1 Answer
For Apache 2.2 you should use:
<Proxy *>
Order Deny,Allow
Deny from all
Allow from x.x.x.x
</Proxy>
ProxyPass / http://yoursite.com/
ProxyPassReverse / http://yoursite.com/
For Apache 2.4 you should use:
<Proxy *>
Require ip x.x.x.x
</Proxy>
ProxyPass / http://yoursite.com/
ProxyPassReverse / http://yoursite.com/