yangzailu

导航

nginx.conf 下日志host.access.log 说明

位置usr/local/nginx/conf/nginx.conf

$server_port 请求端口 

$remote_addr 局域网代理IP;如果没同意任何代理的话$remote_addr 就是真实ip

$http_x_forwarded_for 若有多个IP 一般第一个为客户端请求真实IP

81 | "10.11.251.36" | "112.96.175.44, 10.16.11.145" | "2019-09-26T11:54:44+08:00" | "GET /index.php/wap/member-nodiscuss.html HTTP/1.1" | 500 | 0.750 | 1528 | 5 | "https://mall.lakala.com/index.php/wap/product-1848.html" | "Mozilla/5.0 (Linux; Android 8.0.0; HUAWEI NXT-DL00 Build/HUAWEINXT-DL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044803 Mobile Safari/537.36 MMWEBID/3113 MicroMessenger/7.0.6.1500(0x2700063E) Process/tools NetType/4G Language/zh_CN" | "unix:/var/run/phpfpm.sock" | 500 | 0.750 | 23 |
 "-" | "mall.lakala.com" |

81 为请求端口 112.96.175.44 客户端请求IP

 

 

2. 把--.log日志实时显示到屏幕

 tail -f host.access.log 把最后的日志实时显示到屏幕

 

posted on 2019-09-26 14:27  飞离地平线  阅读(1732)  评论(0编辑  收藏  举报