vi /etc/logrotate.d/nginx
/emc/logs/nginx/*.log {
         daily
         missingok
         rotate 15
         compress
         delaycompress
         notifempty
         create 0640 root root
         sharedscripts
         postrotate
                 if [ -f /emc/web/nginx/mmc/nginx.pid ]; then
                         kill -USR1 `cat /emc/web/nginx/mmc/nginx.pid`
                 fi
         endscript
 }
※ logrotate 가 자동으로 실행되지 않을 경우, cron통해 강제 실행
crontab -e
0 0 * * * /usr/sbin/logrotate -f /etc/logrotate.conf