RHEL Logrotate Apache Logs Daily with Compression

Logrotate is a utility that creates new log files, as well as, renames and compresses the old log files. The basic logrotate paramaters are located in the /etc/lograotate.conf file. The Apache logrotate paramaters are stored in the /etc/logrotate.d/httpd file.

The default Apache logrotate file will create a new log file and rename the old log file and may look like this:

/var/log/httpd/*log {
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}

However there is a need to compress very large daily Apache files. The script may be modified, with daily, rotate 30 (30 for 30 days or some other number for your particular situation), compress, and delaycompress (optional) to the following parameters:

/var/log/httpd/*log {
daily
rotate 30
compress
delaycompress
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}

No reboot is necessary. However, to force a logrotate immediately, execute the following command:

logrotate -vf /etc/logrotate.conf

Sources
http://www.linuxquestions.org/questions/linux-newbie-8/changes-to-my-logrotate-conf-file-do-i-need-to-reboot-780614/
http://gd.tuwien.ac.at/linuxcommand.org/man_pages/logrotate8.html
http://www.unix.com/unix-dummies-questions-answers/48907-logrotate-problems-can-anyone-spot-problem-please.html