¾ÆÆÄÄ¡ ·Î±×ÆÄÀÏ Á¤¸®Çϱâ....
±Û   ¾´   ÀÌ linux
³¯         Â¥ 2003³â 01¿ù 19ÀÏ 00½Ã 24ºÐ 03ÃÊ
º»         ¹® http://www.linuxchannel.net/docs/apache_log.txt
À§»çÀÌÆ®¿¡ °¡º¸¸é ÀÚ¼¼È÷ ¼³¸íµÇ¾î ÀÖ´Ù.

¸ñÀûÀº °¡´ÉÇÑ access_log ÆÄÀÏ¿¡

- ¹æ¹®ÀÚ ¿Ü¿¡ localhost¿¡¼­ php°¡ ½ÇÇàÇÏ´Â ·Î±× ±â·ÏÀº ±â·ÏÇÏÁö ¾Ê´Â´Ù.
- ·Îº¿µéÀÇ Á¢±Ù ±â·ÏÀº µû·Î robot-log ÆÄÀÏ¿¡ ±â·ÏÇÑ´Ù.
- ¿î¿µÀÚ°¡ ÁÖ°í Á¢±ÙÇÒ IP ÁÖ¼Ò´Â ·Î±×¿¡ ±â·ÏÇÏÁö ¾Ê´Â´Ù.
- *.gif, *.jpg, *.png, *.css, *.js, *.java µî°ú °°Àº ÆÄÀÏÀº ·Î±×¿¡ ±â·ÏÇÏÁö ¾Ê´Â´Ù.

ÀÌ Á¤µµÀÇ Á¶°ÇÀ̶ó¸é °¡´ÉÇÑ ¾î´À Á¤µµ ¼öÁØÀ¸·Î ¼ø¼ö ¹æ¹®ÀÚÀÇ Á¢±Ù ±â·Ï¸¸
access_log ÆÄÀÏ¿¡ ±â·ÏÇÒ ¼ö ÀÖ½À´Ï´Ù.

-- httpd.conf(½ÇÁ¦·Î ÇÊÀÚ°¡ ¿î¿µÇÏ´Â ¾ÆÆÄÄ¡ ¼³Á¤ ³»¿ëÀÓ) --------------------
##
## Áß°£ »ý·«
##
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\"" use_robot
##
## Áß°£ »ý·«
##

## ȯ°æº¯¼ö do_not_log¿¡ ÀÏÄ¡ÇÏÁö ¾ÊÀº Á¢±Ù¸¸ access_log ÆÄÀÏ¿¡ ±â·ÏÇÔ.
##
CustomLog /usr/local/apache/logs/access_log combined env=!do_not_log

## Áß°£ »ý·«

## ·Îº¿µéÀº µû·Î robot_log ÆÄÀÏ¿¡ user_robot Æ÷¸Ë¿¡ ¸Â°Ô ±â·ÏÇÔ
##
CustomLog /usr/local/apache/logs/robot_log use_robot env=is_a_robot

## Áß°£ »ý·«

## ƯÁ¤ IP ÁÖ¼Ò´Â ·Î±×¿¡ ±â·ÏÇÏÁö ¾Ê´Â´Ù.
## ÁÖ·Î ¼­¹ö IP ÁÖ¼Ò¿Í ¿î¿µÀÚ°¡ ÀÚÁÖ Á¢¼ÓÇÏ´Â IP ÁÖ¼Òµé
##
SetEnvIf Remote_Addr "^127.0.0.1$" do_not_log
SetEnvIf Remote_Addr "^211.35.159.12[89]$" do_not_log
SetEnvIf Remote_Addr "^211.35.159.1[345][0-9]$" do_not_log

## Áß°£ »ý·«

## ÁÖ·Î À̹ÌÁö ÆÄÀÏÀ» ¿äûÇßÀ» °æ¿ì ·Î±×¿¡ ±â·ÏÇÏÁö ¾Ê´Â´Ù.
##
SetEnvIfNoCase Request_URI "\.(gif|jpg|png|css|js|java)$" do_not_log

## Áß°£ »ý·«

## ·Îº¿µéÀÇ È¯°æº¯¼ö ÁöÁ¤
##
BrowserMatchNoCase "ru-robot" 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_agent3" do_not_log is_a_robot
BrowserMatchNoCase "empas_robot" do_not_log is_a_robot


°ü·Ã °Ô½Ã¹° : 1 (Total 1 Articles)
¹ø È£ Á¦ ¸ñ ±Û¾´ÀÌ ÀÛ¼ºÀÏ Á¶È¸¼ö ¼± ÅÃ
1  ¾ÆÆÄÄ¡ ·Î±×ÆÄÀÏ Á¤¸®Çϱâ.... linux03-01-19415