Question about apache logging

evil_smurf

Verified User
Joined
Mar 3, 2006
Messages
112
I have set the cron job that makes directadmin tally disk and bw usage to run every hour instead of every 24 hours.

@hourly echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue


the reason being is because I find that waiting 24 hours to tally up disk and bw usage for accounts seems to be a little on the long-wait side.


Anyway, as such I have an unliked side effect. The apache logs for the domains are cleared every hour as well.

Is there a way to make the apache logs clear every 24 hours instead of every hour yet still get the correct bw and disk usage tally's every hour, or, have the logs log to the current domain.log files, as well as log to the global access_log (preferred)?
 
Apache Logs

I just noticed this too. I have mine doing the same thing but never noticed it on my lighly used domains. I'd also like to know if there is a way around this.
 
I believe it would require quite a bit of rewriting. The tallying reets the logs because the logs are where the numbers come from for the tally.

Jeff
 
Hello,

Use this guide:
http://www.directadmin.com/features.php?id=507

set:

rotation=0

in your directadmn.conf.
You would then be responsible for doing the rotation whenever you wish.

webalizer=1
can stay, note that the larger the logs are (if you don't rotate them) the longer webalizer takes to find it's last spot where it left off.

John
 
Wow, that was easy :).

I guess I was wrong.

How would we do the rotation then?

Configuring logrotate?

Jeff
 
Logroate would be easiest, yes... assuming it knows how to do wildcards. Note that DA will still handle the ".bytes" file, so don't rotate that in logrotate.

John
 
Back
Top