Hello,
I don't kown if this will help but I don't use logrotate with nginx.
I use a script scheduled in crontab root who do the job.
The script :
retention=7
log="/applis/nginx/logs"
pid="$log/nginx.pid"
mv $log/access.log $log/access.log.$(date +%Y%m%d)
mv $log/error.log $log/error.log.$(date +%Y%m%d)
kill -USR1 `cat $pid`
find $log/ -type f -name "*.log.*" -mtime +$retention -exec rm -f {} \+
I don't kown if this will help but I don't use logrotate with nginx.
I use a script scheduled in crontab root who do the job.
The script :
retention=7
log="/applis/nginx/logs"
pid="$log/nginx.pid"
mv $log/access.log $log/access.log.$(date +%Y%m%d)
mv $log/error.log $log/error.log.$(date +%Y%m%d)
kill -USR1 `cat $pid`
find $log/ -type f -name "*.log.*" -mtime +$retention -exec rm -f {} \+