Linux Apache - 로그관리(rotatelogs,cronolog) > server

본문 바로가기

server

Linux Apache - 로그관리(rotatelogs,cronolog)

페이지 정보

작성자 서방님 댓글 0건 조회 84회 작성일 19-03-29 15:30

본문

□ 기본 로그 경로 중지

BASH

[root@localhost ~]# vi /etc/httpd/conf/httpd.conf .

.

177 # ErrorLog: The location of the error log file. 178 # If you do not specify an ErrorLog directive within a <VirtualHost> 179 # container, error messages relating to that virtual host will be 180 # logged here. If you *do* define an error logfile for a <VirtualHost> 181 # container, that host's errors will be logged there and not here. 182 # 183 #ErrorLog "logs/error_log" ( # 주석 처리 )

.

.

215 # If you prefer a logfile with access, agent, and referer information 216 # (Combined Logfile Format) you can use the following directive. 217 # 218 #CustomLog "logs/access_log" combined ( # 주석 처리 )

.

.

wq (저장)

 

□ rotation 셋팅

BASH

[root@localhost ~]# vi /etc/httpd/conf/vhost.conf

############### webtest11.com Start ############### <VirtualHost *:80> # ServerAdmin webmaster@dummy-host.example.com DocumentRoot /home/test ServerName webtest11.com ServerAlias www.webtest11.com ErrorLog "|/usr/sbin/rotatelogs /home/test/weblog/webtest11-error_log.%y%m%d 86400" ( 추가 또는 수정 ) CustomLog "|/usr/sbin/rotatelogs /home/test/weblog/webtest11-access_log.%y%m%d 86400" combined ( 추가 또는 수정 ) </VirtualHost> ############### webtest11.com End ################# ############### webtest22.com Start ############### <VirtualHost *:80> # ServerAdmin webmaster@dummy-host.example.com DocumentRoot /home/test2 ServerName webtest22.com ServerAlias www.webtest22.com ErrorLog "|/usr/sbin/rotatelogs /home/test2/weblog/webtest22-error_log.%y%m%d 86400" ( 추가 또는 수정 ) CustomLog "|/usr/sbin/rotatelogs /home/test2/weblog/webtest22-access_log.%y%m%d 86400" combined ( 추가 또는 수정 ) </VirtualHost> ############### webtest11.com End #################










댓글목록

등록된 댓글이 없습니다.

Total 349건 1 페이지
게시물 검색

회원로그인

접속자집계

오늘
55
어제
152
최대
592
전체
76,943

그누보드5
Copyright © 서방님.kr All rights reserved.