原文网址:https://www.youyong.top/article/1158e24e5978
服务器的 Apache 信息如果被探测会带来安全隐患,如下图:
原文网址:https://www.youyong.top/article/1158e24e5978
服务器的 Apache 信息如果被探测会带来安全隐患,如下图:
原文网址:https://www.youyong.top/article/1158e24e5978
在 http 头部信息也可以看到服务器及 Apache 版本信息
因此作为服务器加固的一个部分,建议禁止网站服务器返回版本信息。
禁用 Apache 网站服务器签名可以通过编辑 Apache 配置文件来实现。
注意:这里以常见的配置文件位置为例(用户应以实际的配置文件路径为准).
在Debian,Ubuntu上:
$ vi /etc/apache2/apache2.conf
在CentOS上:
$ vi /etc/httpd/conf/httpd.conf
将下面两行添加到 Apache 配置文件底部。
ServerSignature Off
ServerTokens Prod
修改保存后,重启网站服务即可生效,常见的重启服务方法如下:
$ service apache2 restart (Debian, Ubuntu)
$ service httpd restart (CentOS/Aliyun linux)
$ systemctl restart httpd.service (Fedora, CentOS 7)
配置解释:
配置效果如下图:
共 0 条留言
tomcat报warinig Unable to add the resource at [] to the cache
Apache 出现 winnt_accept: Asynchronous AcceptEx faile?
CentOS 6.5系统下 Apache 如何配置 https 服务?
Linux下Apache日志的常用分析方法和日志大小的优化方法
iPhone X 跌破发行价,苏宁200亿入股恒大 | 财经日日评
资深黄牛现身说法:iPhone X价格秒变不停,就像炒股一样
手机扫一扫
分享文章