更新 README.md

增加nginxlog處理
This commit is contained in:
jack 2026-09-15 03:14:25 +00:00
parent 4e41c5e5b7
commit aaac107978
1 changed files with 19 additions and 0 deletions

View File

@ -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
}
```
### 四、主機開機網站自動起始