apacheserverhttpd.confmod-authz-host

Access Control Apache


Just having trouble setting an access control in Apache. So I want to deny access to a specific ip address for a section in my website. So when this ip address access my site, they shouldn't be able to see the "test" section of the website.

This is what I have done inside the httpd.conf file

<Directory /test>
Order Allow,Deny
Allow from all
Deny from 10.13.89.47
</Directory>

Please can someone tell me what I am doing wrong ?

Thanks


Solution

  • Based on the information you have provided, you document root is '/' (very dangerous) or you've not understood how the 'Directory' tag works. I would expect the tag to look something more like.....

    <Directory /srv/www/htdocs/test>