1 |
david wrote: |
2 |
|
3 |
>Sean Wells wrote: |
4 |
> |
5 |
> |
6 |
> |
7 |
>>I use logrotate to loop through the logs daily...I generally only keep a |
8 |
>>weeks worth or so due to size. It'll automatically remove the old ones just |
9 |
>>fine in the end. |
10 |
>> |
11 |
>>Sean Wells |
12 |
>>Network Administrator |
13 |
>>Data Mosaics, Inc. |
14 |
>>2406 S. Dishman Mica Rd. Suite 6 |
15 |
>>Spokane Valley, WA 99206 |
16 |
>>866.904.DMSF (phone) |
17 |
>>509.928.4236 (fax) |
18 |
>>-----Original Message----- |
19 |
>>From: david [mailto:abbottdavid@×××××××××.net] |
20 |
>>Sent: Monday, August 08, 2005 1:01 PM |
21 |
>>To: gentoo-server@l.g.o |
22 |
>>Subject: [gentoo-server] |
23 |
>> |
24 |
>>What is the right way to clean apache2 logs? |
25 |
>>/var/log/apache2/access_log and error_log point to |
26 |
>>/usr/lib/apache2/logs/access_log and error_log |
27 |
>>I have been cd /usr/lib/apache2/logs |
28 |
>>rm access_log |
29 |
>>touch access_log |
30 |
>>chmod 666 access_log same for error_log |
31 |
>>I could leave error_log alone because its not very big, I do it to |
32 |
>>access_log because it is huge and webalizer complains. |
33 |
>>Should root own these logs or apache? |
34 |
>> |
35 |
>> |
36 |
>> |
37 |
>> |
38 |
>Thanks looks like what I need, This is just my server here at the house |
39 |
>for my stuff, do I need to edit anything? |
40 |
># packages can drop log rotation information into this directory |
41 |
>include /etc/logrotate.d |
42 |
> |
43 |
>notifempty |
44 |
>nomail |
45 |
>noolddir |
46 |
> |
47 |
> |
48 |
|
49 |
>Looks like I need to add this /etc/logrotate.conf after compress; |
50 |
> |
51 |
compress |
52 |
"/var/log/apache2/access_log" /var/log/apache2/error_log { |
53 |
rotate 5 |
54 |
size 100k |
55 |
sharescripts |
56 |
postrotate |
57 |
/bin/killall -HUP apache2 |
58 |
endscript |
59 |
} |
60 |
Is that right? |
61 |
|
62 |
> |
63 |
> |
64 |
> |
65 |
|
66 |
-- |
67 |
gentoo-server@g.o mailing list |