Nginx日志_log_format默认参数解释

Nginx日志_log_format默认参数解释

Linux模拟HTTP请求:

[[email protected]_0_2_centos nginx]# curl http://localhost?wd=wwl\&lover=xq

 

access.log:

127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(1)$remote_addr

       客户端请求地址:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(2)$remote_user

客户端请求验证的用户名:这里没有,空

127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(3)$time_local

       本地时间:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(4)$request

       完整的原始请求行:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(5)$status

       服务端响应的状态码:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(6)$body_bytes_sent

       服务端返回给客户端字节大小:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(7)$http_referer

       告诉服务端我是从哪个页面链接过来的:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(8)$http_user_agent

       请求的具体客户端是什么(IE、Chrome、FireFox等):127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

(9)$http_x_forwarded_for

       客户端请求的真实IP,如果代理存在,即有值,否则没值:127.0.0.1 - - [10/Dec/2018:20:06:48 +0800] "GET /?wd=wwl&lover=xq HTTP/1.1" 200 635 "-" "curl/7.29.0" "-" "wwl"-"wd=wwl&lover=xq"-"-"-"-"-"localhost"-"Sat, 08 Dec 2018 04:13:40 GMT"

 

相关文章:

  • 2022-12-23
  • 2021-06-06
  • 2021-11-20
  • 2021-04-06
  • 2021-07-16
  • 2021-11-22
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-11-20
  • 2022-12-23
  • 2021-05-18
相关资源
相似解决方案