Is this:
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
supposed to restart apache after rotating the logs? Could I put a:
/etc/initd/http restart
in there to insure apache is restarted every night?
> -----Original Message-----
> From: Brian N. Smith [mailto:brian (at mark) nuonce.net]
> Sent: Saturday, September 16, 2006 3:46 PM
> To: coba-e (at mark) bluequartz.org
> Subject: [coba-e:06992] Re: Cron <root (at mark) www> run-parts /etc/cron.daily
>
> >I can rest assured that every time this email gets generated on the
> >server,
> > the apache access_log in /var/logs/httpd is set to 0 bytes. What
> > causes
> > apache to set the access log to 0 bytes? What service needs to be
> > restarted
> > to reset the access log, short of a reboot (which works every time)?
>
> I have seen this before.
>
> Look at your
>
> /etc/logrotate.d/apache
>
>
> /var/log/httpd/access_log {
> daily
> prerotate
> rm -rf /tmp/.logrotate_apache_access >/dev/null 2>&1
> cp /var/log/httpd/access_log /tmp/.logrotate_apache_access
> >/dev/null 2>&1
> endscript
> missingok
> notifempty
> sharedscripts
> postrotate
> /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2>
> /dev/null || true
> /usr/local/sbin/split_logs web < /tmp/.logrotate_apache_access
> rm -f /tmp/.logrotate_apache_access >/dev/null 2>&1
> /usr/bin/webalizer.pl
> endscript
> }
>
> That is what you want to look at.
>
> -Brian