nginx增加报文内容打印 待完成
1、增加nginx lua支持模块
2、编写lua脚本,获取传输流
3、配置nginx的配置文件,并刷新
4、测试
1 nginx 配置隐藏版本号:
查看ng信息:curl -I localhost:28080
HTTP/1.1 200 OK
Server: Tengine/2.3.2
Date: Mon, 08 Jun 2020 06:56:21 GMT
Content-Type: text/html
Content-Length: 555
Last-Modified: Thu, 24 Oct 2019 03:55:31 GMT
Connection: keep-alive
ETag: "5db120b3-22b"
Accept-Ranges: bytes
修改配置:
增加配置: server_tokens off;
刷新配置:nginx -s reload
查看ng信息:curl -I localhost:28080
无版本信息了;
HTTP/1.1 200 OK
Server: Tengine
Date: Mon, 08 Jun 2020 07:01:25 GMT
Content-Type: text/html
Content-Length: 555
Last-Modified: Thu, 24 Oct 2019 03:55:31 GMT
Connection: keep-alive
ETag: "5db120b3-22b"
Accept-Ranges: bytes