jackyrar 发表于 2018-11-26 09:40:14

Apache 关闭 access_log 并优化 error_log

  在 Apache 配置文件里面注释掉下面几行:
  #
  # LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined
  # LogFormat “%h %l %u %t \”%r\” %>s %b” common
  #
  # LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\” %I %O” combinedio
  #
  # CustomLog logs/access_log common
  #
  然后重启 Apache WEB 服务器就可以了。
  另外顺便把 error_log 也优化了:
  LogLevel warn
  改成:
  LogLevel crit
  看了几个大型 WEB 2.0 的案例,尤其是 LiveJournal 的惨痛发展经验,正在思考我们刚刚起步的网站如何做好服务器的配置工作,于是做了这个优化。

页: [1]
查看完整版本: Apache 关闭 access_log 并优化 error_log