1
|
●バックアップの取得
|
2
|
[root@web2 logs]# cp -p /etc/logrotate.d/httpd ~/httpd.org
|
3
|
|
4
|
●httpdの設定
|
5
|
|
6
|
以下の内容に変更する。
|
7
|
|
8
|
●Web2
|
9
|
/etc/httpd/logs/*log /etc/httpd/logs/*log_aff /etc/httpd/logs/*log_ad {
|
10
|
missingok
|
11
|
notifempty
|
12
|
sharedscripts
|
13
|
daily
|
14
|
rotate 90
|
15
|
postrotate
|
16
|
/sbin/service httpd reload > /dev/null 2>/dev/null || true
|
17
|
endscript
|
18
|
}
|
19
|
|
20
|
●DB2
|
21
|
/var/log/httpd/*log {
|
22
|
missingok
|
23
|
notifempty
|
24
|
sharedscripts
|
25
|
daily
|
26
|
rotate 90
|
27
|
postrotate
|
28
|
/sbin/service httpd reload > /dev/null 2>/dev/null || true
|
29
|
endscript
|
30
|
}
|
31
|
|
32
|
|
33
|
●Apache再起動
|
34
|
[root@web2 logs]# /etc/init.d/httpd restart
|
35
|
Stopping httpd: [ OK ]
|
36
|
Starting httpd: [ OK ]
|
37
|
|