先停止服務 Apache2.2,而後刪除 access.log。開啟 httpd.conf 並搜尋 access.log,會找到這行:
CustomLog “logs/access.log” common
將其變為
SetEnvIf Remote_Addr “127\.0\.0\.1” dontLog
CustomLog “logs/access.log” common env=!dontLog
資料來源 : http://idaiwan.pixnet.net/blog/post/28172077-apache-%E7%9A%84-access.log-%E4%B8%AD%E4%B8%8D%E7%B4%80%E9%8C%84-127.0.0.1