질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

아파치가 이상해요.

작성자 정보

  • 김석도 작성
  • 작성일

컨텐츠 정보

본문

페도라코어 3 사용하고 있고요.

아파치 로그 관리를 위해 /etc/logrotate.d/httpd 를 다음과 같이

 /usr/local/apache/logs/access_log {
 monthly
 compress
 rotate 2
 mail balleye@netian.com
 errors balleye@netian.com
 postrotate
 /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
 endscript
}
/usr/local/apache/logs/error_log {
 monthly
 compress
 rotate 2
 mail balleye@netian.com
 errors balleye@netian.com
 postrotate
 /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null
|| true
 endscript
}

작성하고 /usr/local/apache/conf/httpd.conf 에

CustomLog "|/usr/bin/rotatelogs /usr/local/apache/logs/access_log 86400" common

같이 설정을 하면 아파치 데몬이 잘 구동 됩니다. 그러나

CustomLog "|bin/rotatelogs /usr/local/apache/logs/access_log 86400" common
위와 같이 설정을 하면 데몬이 뜨지를 않습니다.

/etc/init.d/httpd restart 해도 역시 데몬이 뜨지를 않습니다.

데몬이 뜨더라도

메일이 도착하여 읽어보면

/etc/cron.daily/logrotate:

error: httpd:6 unexpected text
error: httpd:16 unexpected text

위와같은 메시지가 계속 메일로 날아 오고 있습니다.

왜 그런지요.

두번째 질문은 webalizer 를 설치하여 웹에서 로그파일을 불러오면 위의 설정대로

로그파일이 매일 로테이트 되므로 access_log.xxxxxxxx 형식의 로그 파일이

생성되는데 access_log.xxxxxxxx 파일을 webalizer 에서 볼 수 있는 방법은 없는지요.

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,076 명
  • 현재 강좌수 :  36,001 개
  • 현재 접속자 :  557 명