标签:stat ref 自定义 变量 spool remote mat pre variable
L11
nginx 官网的日志格式如下
log_format compression(自定义名称) ‘$remote_addr - $remote_user [$time_local] ‘ ‘"$request" $status $bytes_sent ‘ ‘"$http_referer" "$http_user_agent" "$gzip_ratio"‘; access_log /spool/logs/nginx-access.log compression(使用自己定义的名称) buffer=32k;
一般可以使用如下格式
log_format compression ‘$remote_addr - $remote_user [$time_local] ‘ ‘"$request" $status $bytes_sent ‘ ‘"$http_referer" "$http_user_agent" "$gzip_ratio""$http_x_forwarded_for" ‘;
具体变量可以到官网下 nginx变量去查看
标签:stat ref 自定义 变量 spool remote mat pre variable
原文地址:https://www.cnblogs.com/jackey2015/p/10661252.html