parent
4e41c5e5b7
commit
aaac107978
19
README.md
19
README.md
|
|
@ -200,6 +200,25 @@ $ sudo /usr/sbin/logrotate -f /etc/logrotate.conf #測試執行log壓縮程序
|
|||
endscript
|
||||
}
|
||||
|
||||
/var/log/nginx/*.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 14
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
create 0640 www-data adm
|
||||
sharedscripts
|
||||
prerotate
|
||||
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
|
||||
run-parts /etc/logrotate.d/httpd-prerotate; \
|
||||
fi \
|
||||
endscript
|
||||
postrotate
|
||||
invoke-rc.d nginx rotate >/dev/null 2>&1
|
||||
endscript
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 四、主機開機網站自動起始
|
||||
|
|
|
|||
Loading…
Reference in New Issue