The rotate
directive specifies the number of prior log versions to keep before deleting them.
For CentOS the default value is usually specified in the main /etc/logrotate.conf
file as
rotate 4
So it will keep 4 versions (usually 4 weeks worth). From the man page
rotate count
Log files are rotated count times before being removed or mailed to the address specified in a mail directive. If count is 0, old versions are removed rather than rotated.
You can override the default value on a per log basis, again, from the man pages
logrotate reads everything about the log files it should be handling from the series of configuration files specified on the command line. Each configuration file can set
global options (local definitions override global ones, and later definitions override earlier ones) and specify logfiles to rotate.
The documentation for the include directive contains further information on how config files are processed.
All you really need to do is add rotate 0
to the httpd log definition
/var/log/httpd/*log {
rotate 0
missingok
notifempty
sharedscripts
delaycompress
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}
You probably don't want copytruncate in your definition either the postrotate scripot will take care of opening/closing the files.