This is caused because of your /var/log/*.log
which will create a duplicate entry that conflicts with the logs defined in one or more of the other files in /etc/logrotate.d/
for example dracut
, syslog
and others.
You can test this by running logrotate
on the command line, this is the output I get if I use your httpd file on my CentOS 6.7 system
logrotate /etc/logrotate.conf
error: httpd:1 duplicate log entry for /var/log/dracut.log
error: found error in /var/log/*.log , skipping
other irrelevant output skipped.
I don't know how you have configured your httpd but the defaults for CentOS would be to write logs to /var/log/httpd/
so a common configuration for /etc/logrotate.d/httpd config would be
/var/log/httpd/*log {
missingok
notifempty
sharedscripts
delaycompress
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
If you have changed the default logging location for httpd, perhaps it would be easier to put it back as it was and then use the common config above.
If you can't then you're going to have to list the individual log files that you want rotating (which may be more work than you want)
/var/log/access_log
/var/log/error_log
/var/log/vhost1_access_log
and so on... {
missingok
notifempty
sharedscripts
delaycompress
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript