关闭或者开启apache的目录浏览

2023-05-30,,

为了安全或者方便需要关闭或者开启apache的目录浏览

 
关闭目录浏览 
 
修改http.conf 文件 
 
Options Indexes FollowSymLinks  
 
改为 
 
 Options -Indexes FollowSymLinks
 
 
关闭一些信息 修改 
 
 ServerSignature Off
ServerTokens Prod 
 
 说明 
 
ServerTokens 指令 
 
ServerTokens Prod[uctOnly]
服务器会发送(比如): Server: Apache
ServerTokens Major
服务器会发送(比如): Server: Apache/2
ServerTokens Minor
服务器会发送(比如): Server: Apache/2.0
ServerTokens Min[imal]
服务器会发送(比如): Server: Apache/2.0.41
ServerTokens OS
服务器会发送(比如): Server: Apache/2.0.41 (Unix)
ServerTokens Full (或未指定)
服务器会发送(比如): Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2 
 
 开启目录浏览 
 
 
 
 
<Directory /webwww/wumashi/works>
                Options Indexes FollowSymlinks
</Directory>

关闭或者开启apache的目录浏览的相关教程结束。

《关闭或者开启apache的目录浏览.doc》

下载本文的Word格式文档,以方便收藏与打印。