nginx日誌切割(logrotate或shell腳本)

nginx本身不會對日誌文件進行切割,能夠經過兩種不一樣的方式進行,分別是:經過logrotate和經過shell腳本。node 若是是yum方式安裝的nginx,系統默認會自動經過logrotate這個日誌管理軟件,按天進行分割(配置以下,具體含義可看下文)。linux [root@flume-2 ~]# cat /etc/logrotate.d/nginx /var/log/nginx/*l
相關文章
相關標籤/搜索