nginx日志打印响应时间
文章目录
在http里头配置$request_time
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $request_time';
实例
11.1.27.0 - - [23/Dec/2016:20:22:29 +0800] "GET /demo.js HTTP/1.1" 200 119206 "http://localhost/demo" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0" "-" 0.288

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论