【问题标题】:How to remove apache information completely from response headers如何从响应标头中完全删除 apache 信息
【发布时间】:2014-01-15 04:51:23
【问题描述】:

在 Apache 配置中,服务器发送带有 Apache 信息的 HTTP Header。

google了一下,发现这个信息可以通过设置ServerTokens和ServerSignature指令来控制。

“ServerTokens prod”将在响应标头中仅显示“Apache”。

有没有办法从标题中隐藏“Apache”字样?

【问题讨论】:

  • 你为什么要这样做?
  • 我们的安全团队要求我们从标题中删除任何与产品相关的信息。所以我想知道这是否可能?
  • 试试下面:标头始终未设置“服务器”标头未设置“服务器”

标签: apache


【解决方案1】:

我将举例说明如何在 centos7 操作系统上解决这个问题。

  1. 添加 EPEL rpm:

    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
    
  2. 安装 mod_security:

    yum install mod_security mod_security_crs
    

3.转到 mod_security.conf 文件并编辑它

  1. 擦除“ifModule”中的所有指令,并在“ifModule”中添加SecServerSignature“”指令

  2. 重启服务器

【讨论】:

    猜你喜欢
    • 2014-11-06
    • 1970-01-01
    • 2013-02-14
    • 1970-01-01
    • 2014-06-19
    • 2018-07-09
    • 2018-06-11
    • 2012-06-24
    • 2013-06-02
    相关资源
    最近更新 更多