apache log관리 (rotatelogs 9시 rotate 문제) > server

본문 바로가기
사이트 내 전체검색

server

apache log관리 (rotatelogs 9시 rotate 문제)

페이지 정보

작성자 서방님 댓글 0건 조회 165회 작성일 12-07-02 18:39

본문

acce나 error 로그가 엄청많이 쌓인다 이를 해결 하기 위해서 

아파치에서 제공하는 rotatelogs를 이용하여 하루에 한개씩 로그를 남기기로 설정



ErrorLog "|/usr/local/apache2/bin/rotatelogs /home/web_logs/xxx-error-%Y-%m-%d.log 86400"

#    CustomLog "|/usr/local/apache2/bin/rotatelogs /home/web_logs/xxx-access-%Y-%m-%d.log 86400" combined env=!do_not_log



그러나... 이는 새로운 문제를 발생하였다...이유는 밤 12시에 log가 rotate가 되는것이 아닌 오전 9시에 rotate가 되는것

이는 GMT기준 우리나라가 9시간차이가 나는것 때문이다...

새벽 12시 지나서 각 웹서버 로그를 취합하여 awstats 를 돌렸는데...9시간 가량 데이터 수집이 안되었다...


그래서 아래와 같이 수정을 하였다



ErrorLog "|/usr/local/apache2/bin/rotatelogs /home/web_logs/xxx.net-error-%Y-%m-%d.log 86400 +540"

#    CustomLog "|/usr/local/apache2/bin/rotatelogs /home/web_logs/xxx-access-%Y-%m-%d.log 86400 +540" combined env=!do_not_log


GMT 시간을 우리나라 시간으로 9시간(9*60)을 추가해주니 변경이 잘되다..

댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
84
어제
190
최대
1,347
전체
167,492
Latest Crypto Fear & Greed Index

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