[Cialug] apache deny access to directory tree

Barry Von Ahsen barry at vonahsen.com
Fri Jul 29 16:22:54 CDT 2005


I want to deny access to a whole directory tree, and it's not working. 
I copied the directive from the <Directory />, but no luck.  apache docs 
say one place that it will only deny the directory, and other places say 
the whole tree.

I've tried in httpd.conf
<Directory /var/www/html/dirroot>
<Directory /var/www/html/dirroot*>
<Directory /var/www/html/dirroot/>
<Directory /var/www/html/dirroot/*>
<DirectoryMatch "/var/www/html/dirroot">
<DirectoryMatch "/var/www/html/dirroot*">
<DirectoryMatch "/var/www/html/dirroot/">
<DirectoryMatch "/var/www/html/dirroot/*">
and .htaccess

<Directory /var/www/html/dirroot/>
   Options -All -Multiviews
   AllowOverride None
   <IfModule mod_access.c>
     Order deny,allow
     Deny from all
   </IfModule>
</Directory>

-barry




More information about the Cialug mailing list