I'm trying to get the directories in
my /var/www/html/ directory to not show the "index of..." and all files residing in it.
Do I need to edit httpd.conf and put .htaccess files in each directory to ensure the
contents are hidden? I have Apache version 2.2.3 on CentOS
5.
Is this the part of httpd.conf I need to
edit?
"/var/www/error">
AllowOverride None
Options
IncludesNoExec
AddOutputFilter Includes html
AddHandler
type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer
Fallback
Do
I put a .htaccess file with this in each
directory?
Options
-Indexes
If you
can edit the main config file then add -Indexes
to your Options
line
Options IncludesNoExec
-Indexes
and restart
your apache service.
It's doing this
because there is no href="http://httpd.apache.org/docs/2.0/mod/mod_dir.html#directoryindex"
rel="noreferrer">DirectoryIndex file. You could just put a blank index.html
file in your directory. You could add the -Indexes to a .htaccess
too.
Comments
Post a Comment