取消Apache日誌中的搜索引擎bot記錄在log file設置

打開httpd.conf

SetEnvIf Remote_Addr “127\.0\.0\.” dontlog

SetEnvIfNoCase User-Agent “(msnbot|googlebot|slurp|Baiduspider|bingbot)” dontlog

ErrorLog “../apache-2.2.17-error.log”
CustomLog “|bin/rotatelogs -f ./logs/logfile.%Y.%m.%d.log 86400” combined

 

保存

重啟apache