달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

http://suite.tistory.com/

fs 2008 03

아파치 대표적인 로그인 access_log , error_log 를  관리하는게 여러가지가 있는데 내장된 logrotate 와 같은경우

사용한지 오래되서 기억이 잘안나지만 뭔가 월 날짜 별로 하는게 어려웠던것 같다 그래서 대체용으로 cronolog 를 사용한다.


먼저 설치


1. http://www.cronolog.org/


  $>wget http://cronolog.org/download/cronolog-1.6.2.tar.gz 최신이 2002년~~


2. 컴파일

    $>./configure --prefix=/MPA/apache2/cronolog

    $> make;make install

3. 아파치 http.conf 수정

   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`

   #CustomLog logs/access_log common <- 기존 로그 생성 주석 처리

   # 접근로그는 날짜별로  

   CustomLog  "|/MPA/apache2/cronolog/sbin/cronolog  /MPA/apache2/logs/%Y%m%d.access.log" combined  


  #ErrorLog logs/error_log <- 기존 로그 생성 주석 처리

  # 에러로그는 월별로

  ErrorLog "|/MPA/apache2/cronolog/sbin/cronolog /MPA/apache2/logs/%Y%m.errors.log"


4. 아파치 재시작

  $> ls MPA/apache2/logs 확인


 

 

:
Posted by mastar