zoukankan      html  css  js  c++  java
  • 禁止Apache显示目录的方法

    禁止Apache显示目录的方法

    所有配置均针对conf\httpd.conf文件。

    默认情况,如果appache指定的根目录没有下面项配置的“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>

  • 相关阅读:
    vim 命令详解
    vim基础命令
    JSP取得绝对路径
    sigar开发(java)
    HDU-5273
    HDU-1671
    HDU-1251
    POJ-1743
    POJ-2774
    hihocoder 1145 : 幻想乡的日常
  • 原文地址:https://www.cnblogs.com/showker/p/1715618.html
Copyright © 2011-2022 走看看