《Apache日志配置優化》要點:
本文介紹了Apache日志配置優化,希望對您有用。如果有疑問,可以聯系我們。
相關主題:apache配置
Apache 關閉 access_log 并優化 error
在 Apache 配置文件里面注釋掉下面幾行:
#<IfModule log_config_module>
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
# LogFormat "%h %l %u %t \"%r\" %>s %b" common
# <IfModule logio_module>
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
# </IfModule>
# CustomLog logs/access_log common
#</IfModule>
然后重啟 Apache WEB 服務器就可以了.
另外趁便把 error_log 也優化了:
LogLevel warn
改成:
LogLevel crit
看了幾個年夜型 WEB 2.0 的案例,尤其是 LiveJournal 的慘痛發展經驗,正在思考我們剛剛起步的網站如何做好服務器的配置工作,于是做了這個優化.
歡迎參與《Apache日志配置優化》討論,分享您的想法,維易PHP學院為您提供專業教程。