carpman

Active Member
Sep 12, 2001
44
0
306
Hello, i am trying set up my server so i can manange my logs.

I know that with standard install website logs are rotated at end of month, but i also have some domians setup with logs in home/logs as per:
http://i4net.tv/marticle/get.php?action=getarticle&articleid=22

What i would like to do is tar up these logs at the end of each month and clear logs ready for new month.

Also how do other manange system logs?

/usr/local/apache/logs/error_log
/usr/local/apache/logs/access_log
/var/log/
/var/spool/exim/input/
/var/spool/exim/msglog/

are these rotated? is it possible to get important logs tarred and mailed on regular basis?

cheers
 

carpman

Active Member
Sep 12, 2001
44
0
306
One question?
does this mean that the logs are compressed daily and rotated for 5 months?

If they are compressed daily how will this affected log programs?

I have webbalizer set to run at 23.55 each day for logs set using your instrctions.

Also would a program like webtrends still be able to read compressed files?

Sorry more then one question?

I really would like the customised logs to be compressed and cleared just after webbalzir has run at end of month.

Though i believe that if i have lots of domains using such configuration if may cause problems if they all run at same time each month.

cheers

[quote:59e298348c]:)

you can rotate and compress those access logs you moved from my tutorial by adding an entry that looks like this in the /etc/logrotate.d/apache file:

/home/username/logs/domain.com {
rotate 5
daily
compress
}

for each username and domain.com
[/quote:59e298348c]
 

eva2000

Well-Known Member
Aug 14, 2001
339
15
318
Brisbane, Australia
cPanel Access Level
Root Administrator
Twitter
[quote:f1b0ae81fb] /home/username/logs/domain.com {
rotate 5
daily
compress
}
[/quote:f1b0ae81fb] means logs will rotate daily for 5 days if i understand it :eek:

you would have logs like

domain.com
domain.com.1.gz
domain.com.2.gz
domain.com.3.gz
domain.com.4.gz
domain.com.5.gz
 

carpman

Active Member
Sep 12, 2001
44
0
306
Ok thanks i can set it for higher if needed.

I added your suggestion with correct path and name but get this error:

error: apache:29 bad rotation count\'5 \'
error: -d option is not supported on Linux
/usr/sbin/makewhatis: Can\'t create temp file, exiting.

[Edited on 11/4/01 by carpman]