linux12企业实战 -- 58 nginx日志切割

Posted FikL-09-19

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux12企业实战 -- 58 nginx日志切割相关的知识,希望对你有一定的参考价值。

1.日志切割脚本:

[ctglb@c1n9 conf]$ cat nginx-log-rotate.conf 
/app/nginx/logs/*.log 
   
    nocompress
    daily
    copytruncate
    create
    notifempty
    rotate 30
    olddir /app/nginx/logs/
    missingok
    dateext
    postrotate
        /bin/kill -HUP `cat /app/nginx/logs/nginx.pid 2> /dev/null` 2> /dev/null ||

以上是关于linux12企业实战 -- 58 nginx日志切割的主要内容,如果未能解决你的问题,请参考以下文章