Technical document: apache hide version information

Hide version information

1. Uncomment

vim /usr/local/httpd/conf/httpd.conf
--491行--取消注释
Include conf/extra/httpd-default.conf

Insert picture description here

2, modify the file

vim /usr/local/httpd/conf/extra/httpd-default.conf
-―55行--修改
ServerTokens Prod      #将原本的Full改为Prod,只显示名称,没有版本
#ServerTokens表示Server回送给客户端的响应头域是否包含关于服务器os 类型和编译过的模块描述信息。

Insert picture description here

3. Restart the service

systemctl restart httpd.service

Insert picture description here

4. View

浏览器访问 http://192.168.199.10 , 双击200响应消息查看 Server 项
  • Before the change
    Insert picture description here

  • After the change
    Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_51614581/article/details/112329276