Hi all,
Is it possible to configure Apache to remove old log files after it rotates them
to another filename?
--
Ben Thomas - Melbourne, Australia
22 - '98 Nissan Pulsar SLX sedan
One good turn gets most of the blankets...
Is it possible to configure Apache to remove old log files after it rotates them
to another filename?
--
Ben Thomas - Melbourne, Australia
22 - '98 Nissan Pulsar SLX sedan
One good turn gets most of the blankets...
> Is it possible to configure Apache to remove old log files after it rotates them
> to another filename?
A.
--
Alex Brown
Webmaster, Cable Internet
Conformity is futile.
www.ihatestarwars.com
cd /usr/local/apache/logs
size=100;
size1=`du -a access_log | cut -f1`;
if [ $size1 -gt $size ]; then
mv access_log access_log.old;
mv error_log error_log.old;
kill -USR1 `cat httpd.pid`;
fi
With this script, it is tested, if the logfile access_log has reached a
certain size (100 blocks). If yes it is moved to access_log.old, as well as
error_log. So this is a kind of rotation and you always have access to older
files.
Michael Rudolph
Quote:>Hi all,
>Is it possible to configure Apache to remove old log files after it rotates
them
>to another filename?
>--
>Ben Thomas - Melbourne, Australia
>22 - '98 Nissan Pulsar SLX sedan
>One good turn gets most of the blankets...
1. why are rotated log files deleted?
Hi,
I'm running Apache, and piping the customlog directive to rotatelogs,
which rotates them once a day. The thing, is they are deleted after 1
week (7 files). What is doing the deleting? I actually would prefer
about a 1 month tally of logs before deleting. I can't find any
documentation on why it deletes after 7 days.
Thanks in advance,
Julian
--
--
Julian Wood
Multimedia Developer
University of Calgary
2. ANY ONE USING LCS-8880 MULTIPORT SERIAL CARD?
3. How to rotate log files, apache and mod_ssl?
4. Puzzler: ide DVD-ROM stopped to work in 2.4.20 (Slackware 8.0something)
5. apache log directory, restarting server after rotating logs.
6. running as a different group
7. How do I delete Apache Log Files
11. Rotating Many Logs for Virtual Domains with Apache
12. Rotate and Reset Apache Logs