禁止apache列出站内目录

在/etc/httpd/httpd.conf 文件可找到以下段落:

<Directory "/srv/httpd/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    #Options indexes FollowSymLinks -----------将本行中的indexes 去掉,就不显示apache 站上的目录。如下:

  Options FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

posted @ 2013-08-22 21:31  叫我小艺  阅读(240)  评论(0编辑  收藏  举报
给我发邮件(wanganb@126.com)