Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2000 00:30:59 +0100
From:      Ben Smithurst <ben@FreeBSD.org>
To:        Dan Nelson <dnelson@emsphone.com>
Cc:        Meagan Jia Pi <meagan@e-lingo.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: newsyslog question
Message-ID:  <20000729003059.Y59315@strontium.scientia.demon.co.uk>
In-Reply-To: <20000728173309.A24051@dan.emsphone.com>
References:  <06f101bff8e2$75863410$e293c83f@meagan> <20000728173309.A24051@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson wrote:

> In the last episode (Jul 28), Meagan Jia Pi said:
>> Hi all,
>> 
>> How do I make newsyslog to rotate apache logs every month?
>> The man page is confusing to me. 
>> Thanks in advance.
> 
> Copy the wtmp line:
> 
> /path/to/my/apachelog		644  7	   *	@01T00 Z
> 
> will rotate on the 1st of each month at midnight

Don't forget that you'll need to restart Apache at the same time
("apachectl graceful" in cron, I guess), otherwise it will keep logging
to the old file.  Alternatively it looks as if newsyslog supports specifying a
pid file anyway, so I guess you could use:

/path/to/my/apachelog         644  7     *    @01T00 Z /var/run/httpd.pid

-- 
Ben Smithurst                 / ben@FreeBSD.org / PGP: 0x99392F7D
FreeBSD Documentation Project /


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000729003059.Y59315>