Myluzh Blog

Nginx日志格式化输出,日志切割

2024-2-28 myluzh Nginx

0x01 日志格式化输出 root@iZbp12bkuvg20e1j3y9gtvZ:/etc/logrotate.d# cat /etc/nginx/nginx.conf http { # ... log_format main escape=none '$remote_addr - $remote_user [$time_iso8601] "$request_method $scheme://$host$request_uri" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" time=$request_time upstream_addr=$upstream_addr' '\n $request_body'; access_log /var/log/nginx/access.log main; error_log /var/...

阅读全文>>

标签: nginx logging logrotate log_format access_log error_log

评论(0) (204)