如果需要查看用户在浏览器输入的请求信息,在nginx里面是可以设置打印输出记录的,在http模块中可以设置
http {
log_format access '{"head":"$scheme","host":"$host","ip":"$remote_addr","time":"[$time_iso8601]"}';
access_log logs/ip.log access;
}
然后我们可以在nginx里面logs文件夹可以看到请求的详细信息,比如请求头head是http还是https等,访问域名等,这样对我们排查问题带来很大的方便,把你需要看的参数写入到输出日志里面就可以
{
"head": "http",
"host": "xxx.xxxxx.com",
"ip": "127.0.0.1",
"time": "[2019-10-13T10:51:41+08:00]",
}