Nginx日志_log_format默认参数解释

Nginx日志_log_format默认参数解释

Nginx日志_log_format默认参数解释_第1张图片

Linux模拟HTTP请求:

[root@VM_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"

Nginx下一小节:Nginx 模块介绍

你可能感兴趣的:(Nginx)