如果手动编译安装nginx并不会安装logrotate配置。如果用yun安装nginx会自动安装/etc/logrotate.d/nginx配置文件:
/var/log/nginx/*log {
daily
rotate 10
missingok
notifempty
compress
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
endscript
}
