创建管道
mkfifo /usr/local/nginx/logs/access_log_pipe
执行
nohup cat /usr/local/nginx/logs/access_log_pipe | cronolog /usr/local/nginx/logs/%Y%m%d/access_%Y%m%d%H.log & |
修改nginx配置
access_log /usr/local/nginx/logs/access_log_pipe;
nginx 日志重新加载
service nginx relo