欢迎来到资源库(www.zyku.net)

Windows

当前位置:首页 > 服务器教程 > Windows > 版本号

Apache隐藏版本号及其它敏感信息

时间:2015-11-28|栏目:Windows|点击:|我要投稿

1. 隐藏Apache信息

1.1 主配置中启用httpd-default.conf

文件: conf/httpd.Conf

找到httpd-default.conf,删除前面的注释“#”,改成如下

Include conf/extra/httpd-default.conf

1.2 修改httpd-default.conf

文件:conf/extra/httpd-default.conf

ServerTokens Full 改成 ServerTokens Prod
ServerSignature On 改成 ServerSignature off

 最终如下(文件:conf/extra/httpd-default.conf)

#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
# where Full conveys the most information, and Prod the least.
#
ServerTokens Prod
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory 
# listings, mod_status and mod_info output etc., but not CGI generated 
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature Off

说明:

1、ServerSignature出现在Apache所产生的像404页面、目录列表等页面的底部。

2、ServerTokens目录被用来判断Apache会在Server HTTP响应包的头部填充什么信息。

如果把ServerTokens设为Prod,那么HTTP响应包头就会被设置成:Server:Apache

(资源库 www.zyku.net)

上一篇:禁止 Apache 显示目录列表的方法

栏    目:Windows

下一篇:apache2.4开启gzip压缩的方法

本文标题:Apache隐藏版本号及其它敏感信息

本文地址:https://www.zyku.net/win/69.html

关于我们 | 版权申明 | 寻求合作 |

重要申明:本站所有的文章、图片、评论等内容,均由网友发表或上传并维护或收集自网络,仅供个人学习交流使用,版权归原作者所有。

如有侵犯您的版权,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:95148658 | 邮箱:mb8#qq.com(#换成@)

苏ICP备2020066115号-1

本网站由提供CDN加速/云存储服务