nginx日志打印请求响应时间

log_format  timed_combined  '$remote_addr - $remote_user [$time_local] "$request" '

                          '$status $body_bytes_sent "$http_referer" '

                          '"$http_user_agent" "$http_x_forwarded_for" '

                            '$request_time $upstream_response_time';

access_log  'D:/nginx-1.11.10/logs/access.log' timed_combined;

 

注:'D:/nginx-1.11.10/logs/access.log'--加‘’为绝对路径

nginx.exe -t 重启

nginx.exe -s reload 重载日志

posted @ 2019-05-05 13:25  walle1314  阅读(2979)  评论(0编辑  收藏  举报