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 重载日志

转载于:https://www.cnblogs.com/zsqfightyourway/p/10812453.html

你可能感兴趣的:(nginx日志打印请求响应时间)