编辑httpd.conf文件
找到<Directory "/var/www/html/">换成<Directory "/home/httpd">
然后在找到 Options Indexes FollowSymLinks换成Options -Indexes FollowSymLinks
保存,退出,重新启动Apache服务
这样的话就属于整个Apache禁止目录浏览了
本文介绍如何通过修改httpd.conf配置文件来禁用Apache服务器的目录浏览功能。具体步骤包括更改目录路径设置,并调整选项以关闭索引显示。
编辑httpd.conf文件
找到<Directory "/var/www/html/">换成<Directory "/home/httpd">
然后在找到 Options Indexes FollowSymLinks换成Options -Indexes FollowSymLinks
保存,退出,重新启动Apache服务
这样的话就属于整个Apache禁止目录浏览了