Apache下实现禁止目录浏览
vi /etc/apache/httpd.conf进行编辑httpd.conf文件。
找到Options Indexes FollowSymLinks在Indexes前面加上—符号!如果加+代表允许目录浏览—代表禁止目录浏览。
找到<Directory "/var/www/html/">换成<Directory "/home/httpd">
然后在找到 Options Indexes FollowSymLinks换成Options -Indexes FollowSymLinks
这样的话就属于整个Apache禁止目录浏览了
#
<Directory "/home/httpd">
#
# 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
这个是配置好的禁止整个Apache浏览
找到Options Indexes FollowSymLinks在Indexes前面加上—符号!如果加+代表允许目录浏览—代表禁止目录浏览。
找到<Directory "/var/www/html/">换成<Directory "/home/httpd">
然后在找到 Options Indexes FollowSymLinks换成Options -Indexes FollowSymLinks
这样的话就属于整个Apache禁止目录浏览了
#
<Directory "/home/httpd">
#
# 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
这个是配置好的禁止整个Apache浏览
相关推荐
Kafka 2020-09-18
Wepe0 2020-10-30
杜倩 2020-10-29
windle 2020-10-29
minerd 2020-10-28
mengzuchao 2020-10-22
Junzizhiai 2020-10-10
bxqybxqy 2020-09-30
风之沙城 2020-09-24
kingszelda 2020-09-22
大唐帝国前营 2020-08-18
yixu0 2020-08-17
TangCuYu 2020-08-15
xiaoboliu00 2020-08-15
songshijiazuaa 2020-08-15
xclxcl 2020-08-03
zmzmmf 2020-08-03
newfarhui 2020-08-03
likesyour 2020-08-01