If you want to limit access to a specific directory, you should consider two techniques:
- Authorization Based on Hosts: when the users are limited in number and sources. I will show an example in this post to demonstrate the authorization scheme.
- Password-Protected Directory: when the users are arbitrary or their source are very dynamic. For more details, please refer to my post: How to Password Protect Web Directories by HTDIGEST
For example, you'd like to allow clients only from 10.43.29.0/24 to access to directory /private, you can do this:
[root@localhost html]# vi /etc/httpd/conf/httpd.conf
Deny from all
Allow from 10.43.29.0/24
Please note that "10.43.29.0/24" is in CIDR notation.