在命令行使用以下命令:
curl -I http://127.0.0.1/
会输出你访问网址的头部信息
————————
HTTP/1.1 200 OK
Date: Tue, 10 Dec 2019 13:41:07 GMT
Server: Apache/2.4.33 (Win64) OpenSSL/1.0.2o
Content-Type: text/html; charset=UTF-8
————————
以上的信息暴露之后会给黑客或者恶意者提供有效途径,可以利用以下命令隐藏信息
1.Nginx 在配置文件中
server_tokens off;
2.Apache 在配置文件中
ServerTokens Prod
ServerSignature Off
3.PHP中配置文件找如下配置 修改成Off
expose_php = Off