"아파치 로그 access log"의 두 판 사이의 차이

(사용자 2명의 중간 판 16개는 보이지 않습니다)
1번째 줄: 1번째 줄:
;아파치 로그
;아파치 로그, 아파치 액세스 로그, 웹 로그 access_log
;/var/log/httpd/access_log
;/var/log/httpd/access_log


11번째 줄: 11번째 줄:


;실행예시
;실행예시
<source lang='text'>
<source lang='console'>
[root@jmnote ~]# tail -f /var/log/httpd/access_log
[root@zetawiki ~]# 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)"
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)"
</sourcE>
</sourcE>


==로그 순환 예시==
==로그 순환 예시==
<source lang='dos'>
<source lang='console'>
[root@jmnote ~]# ll /var/log/httpd/access_log*
[root@zetawiki ~]# 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  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 37018971 Dec  2 04:02 /var/log/httpd/access_log.1
28번째 줄: 28번째 줄:


==같이 보기==
==같이 보기==
{{z컬럼3|
*[[아파치]]
*[[아파치]]
*[[로그파일]]
*[[HTTP 요청]]
*[[사용자 에이전트]]
*[[아파치 로그 포맷]]
*[[동시 접속자 수 확인]]
*[[동시 접속자 수 확인]]
*[[/etc/logrotate.d/httpd]]
*[[아파치 오류 로그 error_log]]
}}


==주석==
==주석==
35번째 줄: 43번째 줄:


[[분류: /var/log/httpd]]
[[분류: /var/log/httpd]]
[[분류: 아파치]]
[[분류: 로그]]

2020년 4월 2일 (목) 10:55 판

아파치 로그, 아파치 액세스 로그, 웹 로그 access_log
/var/log/httpd/access_log

1 접속자 실시간 확인

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

명령어
tail -f /var/log/httpd/access_log
실행예시
[root@zetawiki ~]# 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@zetawiki ~]# 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 }}