View Full Version : How delete Apache Log?
eConcept-Web
01-31-2004, 08:58 AM
Hi everybody, i woud like delete the apache error log. How we do that? thx all and Direct Admin is the best panel :)
ProWebUK
01-31-2004, 09:42 AM
/var/log/httpd/*
Delete what you need - main ones should be access_log and error_log
Chris
eConcept-Web
01-31-2004, 02:24 PM
thx
MagnuM
02-06-2004, 04:32 PM
I just check the size of my log dirs with: du -h mydir | grep mydir$
Well, I just see that the size of this log dirs are a little big higher.
The /var/log/httpd dir is 35 Megs, /var/log/exim is 41 Megs and the /var/log dir is 92 Megs. The question is how can I make the dir /var/log not to exceed 20 MB (I don't even know if this is enough).
I am waiting for some suggestions, about what should be normaly the size for the /var/log dir and how can I keep that size to that value, so I do not have problems with the server functionality.
Thanks.
ProWebUK
02-06-2004, 04:40 PM
We use logrotate - it works fine on average volume servers
pico -w /etc/logrotate.conf
daily
rotate 2
create
compress
leave the remainder of the file and add any additional log files you require rotation for there also.
Chris
MagnuM
02-09-2004, 01:39 AM
My /etc/logrotate.conf file looks like this:
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 1
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
Does this mean that all the file from /var/log directory are rotated once a week, or do I have to specify the dirs from /var/log which I need to be rotated.
ProWebUK
02-09-2004, 08:43 AM
That will configure all your main logs - on a standard redhat install it should cover all (if not, most) of the logs in /var/log when you install additional software that doesnt rotate its logs then you can configure them at the bottom of that file and it will include them also.
Chris
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.