centos系統(tǒng)wdcp面板中Apache錯(cuò)誤日志文件占磁盤(pán)問(wèn)題解決方案
最近天水網(wǎng)絡(luò)公司筆者在維護(hù)centos系統(tǒng)時(shí)發(fā)現(xiàn),wdcp面板下的Apache錯(cuò)誤日志文件占滿(mǎn)了磁盤(pán),導(dǎo)致網(wǎng)站無(wú)法登錄后臺(tái)。今天天水市網(wǎng)絡(luò)公司筆者教給大家這個(gè)問(wèn)題的解決方案,希望能幫你解決問(wèn)題。
為了減少不必要的寫(xiě)操作開(kāi)銷(xiāo),提高系統(tǒng)性能,需要要設(shè)置一下錯(cuò)誤日志級(jí)別,找到httpd.conf配置文件下,比如修改文件/www/wdlinux/apache/conf/httpd.conf
LogLevel: Control the number of messages logged to the error_log.
Possible values include: debug, info, notice, warn, error, crit,alert, emerg.
LogLevel warn
其中LogLevel用于調(diào)整記于錯(cuò)誤日志中的信息的詳細(xì)程度??梢赃x擇下列級(jí)別,依照重要性降序排列:
Level Description Example
emerg 緊急 - 系統(tǒng)無(wú)法使用。 “Child cannot open lock file. Exiting”
alert 必須立即采取措施。 “getpwuid: couldn’t determine user name from uid”
crit 致命情況。 “socket: Failed to get a socket, exiting child”
error 錯(cuò)誤情況。 “Premature end of script headers”
warn 警告情況。 “child process 1234 did not exit, sending another SIGHUP”
notice 一般重要情況。 “httpd: caught SIGBUS, attempting to dump core in …”
info 普通信息。 “Server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers)…”
debug 出錯(cuò)級(jí)別信息 “Opening config file …”
默認(rèn)級(jí)別是warn。建議使用 crit 級(jí)別的設(shè)置,這樣只記錄致命級(jí)別以上的日志,可減少垃圾日志。 把LogLevel warn更改為L(zhǎng)ogLevel crit 然后重啟apache即可。
相關(guān)熱詞搜索: centos,wdcp,Apache,錯(cuò)誤日志,磁盤(pán),解決方