Cleaning Apache log files (newsbie question)

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
What I have to do to clean apache log files on all accounts ?
 

feanor

Well-Known Member
Aug 13, 2001
836
0
316
For all at once? By clean you mean....... trim?
I would trim all of them down to something between 5 and 10 thousand lines all in one shot, with a shell script that simply opens each, copies output to /tmp or something, and then back to /usr/local/apache/domlogs...........

Is this the type of thing you mean? If so I could help further with specifics....

You'd be restarting apache afterwards of course.
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
I intend delete .

How to Delete all apache log files , for each account , every month , to free web space .


Thanks
 

feanor

Well-Known Member
Aug 13, 2001
836
0
316
Remove everything in /usr/local/apache/domlogs

And then
killall -9 httpd
/etc/rc.d/init.d/httpd startssl &


This will remove ALL the domlogs for any domain hosted on that server..... statistical data will be lost at the next time a customer runs their webalizer or analog stats. (They'll be overwritten by the output of crunching the new, cleansed logs)

just FYI