參考1
參考2

Apache上,任何連線紀錄都會存在httpd-access.log檔
(依照http.conf設定而有不同)

如果對於特定連線不想在Apache Server留下紀錄
可以用 SetEnvIf 這個參數

需修改http.conf

#不紀錄來自127.0.0.1的連線
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
CustomLog logs/access_log common env=!dontlog

 

#不紀錄存取robot.txt的連線
SetEnvIf Request_URI "^/robots\.txt$" dontlog
CustomLog logs/access_log common env=!dontlog

 

SetEnvIf後面可接的參數如下:

Host
User-Agent
Referer
Accept-Language
Remote_Host:
the hostname (if available) of the client making the request.
Remote_Addr:
the IP address of the client making the request.
Server_Addr:
the IP address of the server on which the request was received (only with versions later than 2.0.43).
Request_Method:
the name of the method being used (GET, POST, etc.).
Request_Protocol:
the name and version of the protocol with which the request was made (e.g., "HTTP/0.9", "HTTP/1.1", etc.).
Request_URI:
the resource requested on the HTTP request line - generally the portion of the URL following the scheme and host portion without the query string.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 slinbody 的頭像
    slinbody

    495884965

    slinbody 發表在 痞客邦 留言(0) 人氣()