httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Bell <>
Subject Re: [users@httpd] Directory Permssions
Date Mon, 13 Jul 2009 23:57:09 GMT
On Jul 13, 2009, at 1:37 PM, ML wrote:

> Hello All,
> I am confused about directory permissions inside of my wwwroot/
> I am using name-based virtual hosting and I have y web root as /var/ 
> www/html
> All of my websites are inside /var/www/html in their own directories.
> How can I i have a directory protected from crawlers indexing it?  
> What is the right permission set?
> How can I have a directory that apache can use, but nobody can  
> browse to?
> The reason is that I have PHP/MySQL Setup and I store all of my  
> MySQL connection information and queries in a directory and I dont  
> want people 'finding' this by simple browsing the website or using a  
> web grabber to take a copy of the whole site.
> Can anyone provide insight?

To prevent a directory from being served by the webserver, do this:

<Directory /path/to/directory>
     Order allow,deny
     Deny from all

Put this block in your <VirtualHost> block.

Doug Bell -- Senior Developer, Plain Black Corp.
[ ]
all that groks is

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message