Log Rotation for suexec log file

Log Rotation for suexec log file

Post by David Mei » Fri, 28 Mar 2003 03:39:22



Hi all,

is it possible to use piped logs to rotate the logfile written by
suexec? Could it be configured in the file suexec.h like this:

#define LOG_EXEC "|/usr/local/sbin/cronolog
/var/log/apache/%Y/%m/%d/cgi.log"

Does someone has experience on this?

 
 
 

Log Rotation for suexec log file

Post by AndrĂ© Mal » Fri, 28 Mar 2003 04:12:38



> is it possible to use piped logs to rotate the logfile written by
> suexec? Could it be configured in the file suexec.h like this:

> #define LOG_EXEC "|/usr/local/sbin/cronolog
> /var/log/apache/%Y/%m/%d/cgi.log"

No. suexec isn't a daemon so creating a new pipe at every suexec'd request
is a lot of overhead. Rotating the logfile by renaming via cronjob is safe
and should be sufficient.

Alternatively you can edit the suexec code but this is NOT recommended.

nd
--
die (eval q-qq:Just Another Perl Hacker
:-)

# Andr Malo, <http://pub.perlig.de/> #

 
 
 

1. Apache 1.3.3 log file rotation leaves open file descriptors

In Apache 1.3.3 (Solaris) we are using the USR1 signal (or HUP) to rotate the
log files daily.

Our rotation strategy is:
1) rename log file
2) issue USR1

What appears to be happening though, is that Apache is not closing the file
descriptors for the old log files. (We eventually run out of file descriptors -
in just over a month)  and lsof shows that Apache still has all the old log
files open.

Anyone else noticed this behaviour?

Thanks,
Mark Hume

2. Strange GPM / X non-problem

3. Rotation of log file by syslogd

4. XFS 1.0 is getting close!

5. Tail and rotation log files

6. LPD on OSE 5.0

7. Log File Security and Rotation

8. Trouble some su command

9. Console Log rotation - Reset/Empty file?

10. Log file rotation problem with NCSA httpd 1.4[.1]

11. wtmp log file and rotations

12. File Size for Log Rotation

13. ANNOUNCE: an alternative log file rotation program for Apache