首页 > 其他 > 详细

nginx 的应用记录

时间:2020-06-11 01:28:23      阅读:45      评论:0      收藏:0      [点我收藏+]

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

nginx 的应用记录

原文:https://www.cnblogs.com/poorloser/p/13089365.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!