這樣不行 ==> 454 = floor(1300 * 0.35);
要改這樣 ==> 455 = floor(number_format(1300 * 0.35, 2));
2014-06-29
2014-06-11
Apache error log 檔案 滿了 造成服務器當機問題
首先,停止Apache服務,並刪除Apache下/logs/目錄中的error.log和access.log文件。
然後,打開Apache的conf/httpd.conf設定檔並找到下兩條配置:
ErrorLog
logs/error.log
CustomLog logs/access.log common
CustomLog logs/access.log common
直接在前面加#注釋掉,換成下面的設定檔。
錯誤日誌檔error.log
# 限制錯誤日誌檔為 1M
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M”
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M”
或者
# 每天生成一個錯誤日誌檔
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400"
日誌檔access.log
# 限制訪問日誌檔為 1M
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M” common
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M” common
或者
# 每天生成一個訪問日誌檔
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400" common
訂閱:
文章 (Atom)