编辑虚拟主机文件 /etc/nginx/conf.d/default.conf  在server段添加如下配置

if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})"){
                    set $year $1;
                    set $month $2;
                    set $day $3;
            }
            access_log /data/logs/app_$year-$month-$day.log main;

 

相关文章:

  • 2021-12-13
  • 2021-12-18
  • 2021-07-15
  • 2021-09-17
猜你喜欢
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-06-30
  • 2021-08-20
相关资源
相似解决方案