logwatch 에 nginx 로그 파일 추가
동작 확인 필요
cp /usr/share/logwatch/default.conf/services/http.conf /etc/logwatch/conf/services/http.conf cp /usr/share/logwatch/scripts/services/http /etc/logwatch/scripts/services/httpd
conf
/etc/logwatch/conf/services/http.conf:
Title과 LogFile 을 http 에서 nginx 로 변경
Title = "nginx" # Which logfile group... LogFile = nginx
logfile 설정
/etc/logwatch/conf/logfiles/http.conf
LogFile = /var/log/nginx/*access.log LogFile = /var/log/nginx/*access.log.1 Archive = /var/log/nginx/*access.log.*.gz # Expand the repeats (actually just removes them now) *ExpandRepeats # Keep only the lines in the proper date range... *ApplyhttpDate
Ref
- http://blog.shlrm.org/blog/2012/05/09/adding-nginx-to-logwatch-output/
- http://lintut.com/logwatch-how-to-for-centos-or-red-hat/
Related content
WebTatic 에서 Nginx 패키지 설치후 log rotate 후 log 파일이 0 이 되는 문제 해결
WebTatic 에서 Nginx 패키지 설치후 log rotate 후 log 파일이 0 이 되는 문제 해결
More like this
nginx 와 nodejs 연동
nginx 와 nodejs 연동
More like this
nginx log를 rotate 해서 일자별로 관리(logrotate)
nginx log를 rotate 해서 일자별로 관리(logrotate)
More like this
nginx 에 HTTPS/SSL 적용하기
nginx 에 HTTPS/SSL 적용하기
More like this
nginx POST data 로깅 남기기
nginx POST data 로깅 남기기
More like this
nginx 로드 밸런싱 설정 (load balancing)
nginx 로드 밸런싱 설정 (load balancing)
More like this