아파치 로그 access log

Jmnote (토론 | 기여)님의 2014년 1월 22일 (수) 14:55 판 (→‎같이 보기)
아파치 로그
/var/log/httpd/access_log

1 접속자 실시간 확인

접속자 정보[1]를 확인할 수 있다.

명령어
tail -f /var/log/httpd/access_log
실행예시
[root@jmnote ~]# tail -f /var/log/httpd/access_log
111.222.33.44 - - [11/Jun/2012:22:12:32 +0900] "GET /w/custom/jmnote20120124.ico HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; MS-RTC LM 8)"

2 로그 순환 예시

[root@jmnote ~]# ll /var/log/httpd/access_log*
-rw-r--r-- 1 root root  8639222 Dec  3 18:06 /var/log/httpd/access_log
-rw-r--r-- 1 root root 37018971 Dec  2 04:02 /var/log/httpd/access_log.1
-rw-r--r-- 1 root root 33874929 Nov 25 04:02 /var/log/httpd/access_log.2
-rw-r--r-- 1 root root 32293255 Nov 18 04:01 /var/log/httpd/access_log.3
-rw-r--r-- 1 root root 36973213 Nov 11 04:00 /var/log/httpd/access_log.4
→ 매주 일요일 04:00에 새파일로 교체되고 있으며, 예전 파일은 4개까지 보관한다.[2]

3 같이 보기

4 주석

  1. IP, 요청한 웹페이지 주소, OS/브라우저 정보
  2. 최소 28일 이상의 로그가 보관되는 셈
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}