2015年3月20日

取消 apache log 中的 "internal dummy connection" 訊息記錄

- ::1 - - [19/Mar/2015:13:39:36 +0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.1e-fips PHP/5.4.35 (internal dummy connection)"
- ::1 - - [19/Mar/2015:13:39:35 +0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.1e-fips PHP/5.4.35 (internal dummy connection)"
- ::1 - - [19/Mar/2015:13:39:26 +0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.1e-fips PHP/5.4.35 (internal dummy connection)"
- ::1 - - [19/Mar/2015:13:39:25 +0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.1e-fips PHP/5.4.35 (internal dummy connection)"
- ::1 - - [19/Mar/2015:13:39:24 +0800] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.1e-fips PHP/5.4.35 (internal dummy connection)"


編輯 httpd.conf 或者 httpd-vhost.conf

尋找
CustomLog logs/access_log combined

改成
SetEnvIf Remote_Addr "::1" dontlog
CustomLog logs/access_log combined env=!dontlog


重啟 apache

Reference : http://40era.com/4264/

0 意見:

張貼留言