怎样购买网站域名,wordpress宝塔优化,网站的建设过程,站长工具百度有时为了方便分析接口性能等#xff0c;需要记录请求的时长#xff0c;通过修改nginx的日志格式可以做到#xff0c;如添加一个新的log_formatlog_format timed_combined $remote_addr - $remote_user [$time_local] $request $status $body_bytes_sent 需要记录请求的时长通过修改nginx的日志格式可以做到如添加一个新的log_formatlog_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 /var/log/nginx/access.log timed_combined;上面新增的参数是request_time -This shows how long Nginx dealt with the requestupstream_response_time - Gives us the time it took our upstream server (in this case Apache/mod_wsgi) to respond参考https://lincolnloop.com/blog/tracking-application-response-time-nginx/