美文网首页
nginx 开启$request_id

nginx 开启$request_id

作者: _浅陌 | 来源:发表于2021-01-25 14:23 被阅读0次

1.修改在nginx.conf同一路径下的fastcgi_params文件,添加如下内容

fastcgi_param HTTP_REQUEST_ID $request_id;

2.添加nginx的日志格式:

log_format sas '$http_x_forwarded_for - $request_id';

日志文件如下:

106.121.69.190 - 06a1b46d7113831c32f572293ce4e813

相关文章

网友评论

      本文标题:nginx 开启$request_id

      本文链接:https://www.haomeiwen.com/subject/rfobzktx.html