Re: why is web traffic being written to the rotated log file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would assume you could also use rotatelogs, which according to my man page, is included with Apache HTTP Server...

usage in your httpd.conf would be as follows:
CustomLog "|/path/to/bin/rotatelogs /path/to/logs/sitename-access_log 86400 -240" mediahouse ErrorLog "|/path/to/bin/rotatelogs /path/to/logs/sitename-error_log 86400 -240" mediahouse

That's what we do....rotates about every 24 hours
< man rotatelogs > for more information

Tom Callahan
TESSCO Technologies
Desk: (410)-229-1361
Cell: (410)-588-7605
Email: callahant@xxxxxxxxxx

A real engineer only resorts to documentation when the keyboard dents on the forehead get too noticeable.



Chris W. Parker wrote:

A.Fadyushin@xxxxxxxxxxxx <mailto:A.Fadyushin@xxxxxxxxxxxx>
   on Wednesday, March 29, 2006 5:33 AM said:

The problem with logrotate and absence of execute permission for /tmp
may be solved by editind /etc/cron.daily/logrotate script and setting
therein the variable TMPDIR (via 'export TMPDIR=<somewhere>' before
calling logrorate) to some directory with execute permission (for
example /var/run). The logrotate will then use value of TMPDIR instead
of /tmp.

Sounds good except look what I found in /etc/cron.daily/logrotate:

#!/bin/sh

# TMPDIR value other than /tmp needs to be set because of the noexec
# option on /tmp that is currently set.
export TMPDIR=/var/tmp/logrotate

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
   /usr/bin/logger -t logrotate "ALERT exited abnormally with
[$EXITVALUE]"
fi
exit 0


Any other ideas?


Thank you,
Chris.


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux