ok here i wanted to share nginx logrotated run in RHEL. I run this script because iam using Dimdim with nginx engine and it store a huge log file.
Script for nginx logrotate.
Logs is located at /usr/local/dimdim/nginx/logs
Add nginx file and edit or add at /etc/logrotate.d
copy & paste this script
kill -USR1 `cat /usr/local/dimdim/nginx/logs/nginx.pid`
add rules at crontab so it can be run in time you set for the log
# rotating logrotate
59 23 * * * root /usr/sbin/logrotate -f /etc/logrotate.conf