0

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

dark_illusion_909099
  • 1,067
  • 2
  • 21
  • 41

2 Answers2

0

I have used something else to get it working.

<Location/test>
Order Allow,Deny
Allow from all
Deny from 10.13.89.47
</Location>
dark_illusion_909099
  • 1,067
  • 2
  • 21
  • 41
0

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>
symcbean
  • 47,736
  • 6
  • 59
  • 94