nginx 配置access.log文件,每天生成一个新文件。
在http模块加上下面蓝色的配置:
http {
include mime.types;
default_type application/octet-stream;
map $time_iso8601 $logdate {
'~^(?<ymd>\d{4}-\d{2}-\d{2})' $ymd;
default 'date-not-found';
}
access_log logs/access-$logdate.log;
}