I'm having a heck of a time getting logrotate to work. I've searched the web and read the directions from various sources and keep coming up with the same tye of errors. Below is my logrotate.conf
# see "man logrotate" for details
# rotate log files daily
daily
# keep 7 days worth of backlogs
rotate 7
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
weekly
create 0664 root utmp
rotate 3
}
# system-specific logs may be also be configured here.
This is the main errors I'm trying to find out why they are happening.
/usr/sbin/logrotate -vf /etc/logrotate.conf
reading config file /etc/logrotate.conf
error: /etc/logrotate.conf:3 unexpected text
error: /etc/logrotate.conf:4 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:6 unexpected text
error: /etc/logrotate.conf:7 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:9 unexpected text
error: /etc/logrotate.conf:10 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:12 unexpected text
error: /etc/logrotate.conf:13 lines must begin with a keyword or a filename (possibly in double quotes)
including /etc/logrotate.d
error: Ignoring named.rpmnew, because of .rpmnew ending
error: Ignoring syslog.rpmorig, because of .rpmorig ending
error: Ignoring rpm.rpmnew, because of .rpmnew ending
error: Ignoring cups.rpmnew, because of .rpmnew ending
reading config file cups
reading config info for /var/log/cups/*_log
reading config file exim
reading config info for /var/log/exim_mainlog
reading config info for /var/log/exim_paniclog
reading config info for /var/log/exim_rejectlog
reading config file httpd
reading config info for /var/log/httpd/*log
error: httpd:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: httpd:2 unexpected text
error: httpd:3 unexpected text
error: httpd:4 unexpected text
error: httpd:5 unexpected text
error: httpd:6 unexpected text
error: httpd:7 unexpected text
error: httpd:8 unexpected text
error: httpd:9 unexpected text
error: httpd:prerotate or postrotate without endscript
Does anyone have any ideas, I've been trying to figure this out now for 2 days.
Appreciate any input
Thanks in advance
BTW I'm running Apache 1.3.33, on a linux server with WHM cPanel 10.x
# see "man logrotate" for details
# rotate log files daily
daily
# keep 7 days worth of backlogs
rotate 7
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
weekly
create 0664 root utmp
rotate 3
}
# system-specific logs may be also be configured here.
This is the main errors I'm trying to find out why they are happening.
/usr/sbin/logrotate -vf /etc/logrotate.conf
reading config file /etc/logrotate.conf
error: /etc/logrotate.conf:3 unexpected text
error: /etc/logrotate.conf:4 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:6 unexpected text
error: /etc/logrotate.conf:7 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:9 unexpected text
error: /etc/logrotate.conf:10 lines must begin with a keyword or a filename (possibly in double quotes)
error: /etc/logrotate.conf:12 unexpected text
error: /etc/logrotate.conf:13 lines must begin with a keyword or a filename (possibly in double quotes)
including /etc/logrotate.d
error: Ignoring named.rpmnew, because of .rpmnew ending
error: Ignoring syslog.rpmorig, because of .rpmorig ending
error: Ignoring rpm.rpmnew, because of .rpmnew ending
error: Ignoring cups.rpmnew, because of .rpmnew ending
reading config file cups
reading config info for /var/log/cups/*_log
reading config file exim
reading config info for /var/log/exim_mainlog
reading config info for /var/log/exim_paniclog
reading config info for /var/log/exim_rejectlog
reading config file httpd
reading config info for /var/log/httpd/*log
error: httpd:1 lines must begin with a keyword or a filename (possibly in double quotes)
error: httpd:2 unexpected text
error: httpd:3 unexpected text
error: httpd:4 unexpected text
error: httpd:5 unexpected text
error: httpd:6 unexpected text
error: httpd:7 unexpected text
error: httpd:8 unexpected text
error: httpd:9 unexpected text
error: httpd:prerotate or postrotate without endscript
Does anyone have any ideas, I've been trying to figure this out now for 2 days.
Appreciate any input
Thanks in advance
BTW I'm running Apache 1.3.33, on a linux server with WHM cPanel 10.x