禁止apache直接显示目录文件列表
    禁止apache直接显示目录文件列表
所有配置均针对conf\httpd.conf文件。
默认情况,如果apache指定的根目录没有下面项配置的“index.php index.html index.htm”文件之一,则appache会显示目录及目录下的所有文件:
<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm
</IfModule>
禁止apache显示目录的方法是删除“Options Indexes FollowSymLinks”中的“Indexes”项:
<Directory “C:/Webs”>
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
修改后:
<Directory “C:/Webs”>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>