| 19 번 글: [Apache] is a robot (yet) |
| 글쓴이: 산이
[홈페이지]
|
글쓴날: 2003년 01월 25일 21:42:59 토(저녁) |
조회: 4372 |
좀더 추가해야 함...
<소스>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
## 로봇 로그에 사용할 로그 형태를 정의함
##
LogFormat "%h %l %u %t \"%r\" %>s %b
\"%{User-Agent}i\"" robot
## 로봇 전체 : is_a_robot
## 접근 거부할 로봇 : deny_robot
## deny_robot은 웹 서버에 과부하를 가져오거나 통째로 내용을
긁어 가는 로봇들을 의미함
## 정의되지 않은 나머지 로봇은 접근 허용
## 기본 로그 파일에 기록하지 않을 호스트나 파일 : do_not_log
BrowserMatchNocase "WebZIP" is_a_robot deny_robot
BrowserMatchNocase "Teleport" is_a_robot deny_robot
BrowserMatchNocase "GetRight" is_a_robot
BrowserMatchNocase "Namo" is_a_robot deny_robot
BrowserMatchNocase "ApacheBench" is_a_robot deny_robot
BrowserMatchNocase "Wget" is_a_robot deny_robot
BrowserMatchNoCase "robot" do_not_log is_a_robot
BrowserMatchNoCase "[a-zA-Z]@[a-zA-Z]" do_not_log is_a_robot
BrowserMatchNoCase "Slurp/si" do_not_log is_a_robot
BrowserMatchNoCase "Mercator" do_not_log is_a_robot
BrowserMatchNoCase "Gulliver" do_not_log is_a_robot
BrowserMatchNoCase "SyncIT/" do_not_log is_a_robot
BrowserMatchNoCase "FAST-WebCrawler" do_not_log is_a_robot
BrowserMatchNoCase "Lycos_Spider" do_not_log is_a_robot
BrowserMatchNoCase "^ia_archive" do_not_log is_a_robot
BrowserMatchNoCase "^tv" do_not_log is_a_robot
BrowserMatchNoCase "Scooter" do_not_log is_a_robot
BrowserMatchNoCase "ZyBorg/" do_not_log is_a_robot
BrowserMatchNoCase "KIT-Fireball" do_not_log is_a_robot
BrowserMatchNoCase "Googlebot/" do_not_log is_a_robot
BrowserMatchNoCase "DIIbot/" do_not_log is_a_robot
BrowserMatchNoCase "teoma" do_not_log is_a_robot
SetEnvIf Remote_Addr "^127\.0\.0\.1$" do_not_log ## localhost
SetEnvIf Remote_Addr "^192\.168\.(0|10)\.*" do_not_log ## local network
SetEnvIf Remote_Addr "^123\.123\.123\.1[345][0-9]$" do_not_log is_a_robot
deny_robot
SetEnvIf Remote_Addr "^211\.233\.28\.1*" do_not_log is_a_robot
SetEnvIf Remote_Addr "^203\.233\.104\.*$" do_not_log is_a_robot
SetEnvIf Remote_Addr "^211\.218\.15[01]\.*" do_not_log is_a_robot
SetEnvIfNoCase Request_URI "\.(gif|jpg|png|css|js|java)$" do_not_log
SetEnvIfNoCase Request_URI "^/robots\.txt" do_not_log is_a_robot
SetEnvIfNoCase Request_URI "(default\.ida|XXXXXXXXXXX)" do_not_log
SetEnvIfNoCase Request_URI "favicon\.ico" do_not_log
SetEnvIfNoCase Request_URI "^/(c|d|scripts|_vti_bin|_mem_bin|msadc)/(.+)$"
do_not_log
SetEnvIfNoCase Request_URI "^/codered/(.+)$" do_not_log
## deny_robot은 접근을 허용하지 않도록 설정
##
<Directory />
Order allow,deny
Allow from all
Deny from env=deny_robot
</Directory>
## custom log
##
CustomLog /usr/local/apache/logs/access_log combined env=!do_not_log
## robot log
##
CustomLog /usr/local/apache/logs/robot_log robot env=is_a_robot
</소스>
|
이전글 : Re: tables_traverse.jpg
다음글 : [PHP] class of OGG
|
from 61.254.75.40
JS(Redhands)Board 0.4 +@
|