Apache log rotation
    Jonathan Chen 
    jonc at chen.org.nz
       
    Wed Oct 19 02:00:09 PDT 2005
    
    
  
On Wed, Oct 19, 2005 at 03:54:15PM +0700, Olivier Nicole wrote:
[...]
> Is there a clean way to rotate these logs a la newsyslog?
> 
> I know I can use newsyslog to rotate them, but then how to notify
> Apache to use the new log files? I don't expect a signal HUP sent to
> httpd would be enough.
It is. All you need to make sure that only the last line has the HUP
to the httpd, as newsyslog works from top to bottom. eg:
/var/log/apache/httpd-access.log    644  12    *    $M1D0 BN
/var/log/apache/httpd-error.log     644  12    *    $M1D0 B   /var/run/httpd.pid
Cheers.
-- 
Jonathan Chen <jonc at chen.org.nz>
----------------------------------------------------------------------
                   "Lots of folks confuse bad management with destiny"
                                                         - Kin Hubbard
    
    
More information about the freebsd-questions
mailing list