Server
아파치 로그에서 특정IP만 기록안하기
EcusE
2001. 8. 8. 17:07
자기 서버를 수정하거나 글을 올리기만해도 자기의 아이피가 기록이 되니 쓸데없이 로그파일이 커져서 고민중-_-;;
좋은 팁이 있어서 소개합니다~ 다음은 httpd.conf 내용중 수정할 부분입니다.
- ServerAdmin webmaster@host.some_domain.com
- DocumentRoot /www/docs/host.some_domain.com
- ServerName host.some_domain.com LogFormat "%h %l %u %t "%r" %>s %b" common
- ErrorLog logs/host.some_domain.com-error_log
- SetEnvIf Remote_Addr 192.168.100.13$ do_not_log
- CustomLog logs/access_log combined env=!do_not_log
아파치 1.3.5 이상과 mod_log_config, mod_setenv 모듈이 로드되어야 한다고 합니다~
관련 링크: http://gnuhacker.com