ok guys.
Im very puzzled with this and though Ive been adminstering my own Centos servers for a couple of years now I go a bit rusty as I dont have play with them daily

(and theres lots to learn in 'nix)
Im having a problem with my Logrotate.
Basically, I have a Centos server using the latest Centos version and all updated software. It is a webserver and serves 10 websites that are my living.
Linux
server@******.net 2.6.9-42.0.10.plus.c4smp #1 SMP Tue Feb 27 17:29:28 EST 2007 i686 i686 i386
GNU/Linux
It was working ok with regards to rotating main log files and renaming them but I added a new file in logrotate.d and since then it has not been playing ball! (even when I removed the file I added) The file I added was called 'virtual' and contained the following becuase the logs on my virtual hosts were getting too bad and I really want them to rotate as manual is a pain.
Quote:
/var/log/httpd/*/.accesslog /var/log/httpd/*/.errorlog /var/log/httpd/*/.sslerrorlog /var/log/httpd/*/.sslaccesslog {
daily
missingok
rotate 365
compress
delaycompress
notifempty
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
|
Heres my httpd logrotate.d file (original one)
Quote:
var/log/httpd/*.log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
|
ok. So I did this and went to force rotation so that my log files would be brought back to decent sizes..
and I get the following error messages below?
Quote:
[root@server ~]# logrotate -f /etc/logrotate.conf
error: httpd:1 unknown option 'var' -- ignoring line
error: httpd:1 unexpected text
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: prerotate or postrotate without endscript
|
This is my logrotate.conf and as you can see its pretty bog standard
Could anyone please tell me what is the problem here. it would be most appreciated

thanks
Quote:
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# 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 {
monthly
create 0664 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
#max log file size
size=30m
|