xglys 发表于 2017-1-6 09:32:53

如何使 Apache 不显示目录列表

将 Indexes 去掉前

http://dl.iteye.com/upload/attachment/593539/f3cfd5d3-3a45-305d-8cd5-78b3c4c022fa.png

将 Indexes 去掉后

http://dl.iteye.com/upload/attachment/593541/119d29a7-29b7-373c-9511-e37e051f2f02.png

<Directory "../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.0/mod/core.html#options
# for more information.
#
    Options Indexes 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 All

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

</Directory>
页: [1]
查看完整版本: 如何使 Apache 不显示目录列表