글 수 18
가상서버를 운영하시는 분들중에 웹브라우저에서 Proxy 오류가 생기신다면 반드시
/var/log/httpd 디렉토리에서 access_log 와 error_log 의 사이즈를 확인해보시길 바랍니다.
보통 파일의 사이즈가 2G 가 넘어간다면, 웹서버가 웹로그가 쌓이는데 있어서 부하가 많이 걸리게 되므로 Proxy 의 오류가 생기게
됩니다.
그 원인은 로그파일을 분할하는 주기가 주간단위이기 때문에 그렇고, 이를 해결하기 위해서는 로그파일의 분할주기를 일일로 바꾸시
면 됩니다.
아래의 /etc/logrotate.conf 파일의 내용중 빨간색으로 된 부분을 참고하셔서 변경하시면 됩니다.
# see "man logrotate" for details
# rotate log files weekly
# weekly
daily
# keep 4 weeks worth of backlogs
# rotate 4
rotate 2
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
# monthly
dailly
minsize 1M
create 0664 root utmp
rotate 2
}
# system-specific logs may be also be configured here.
분할주기를 변경하신뒤 rm -rf /var/log/httpd/*_log 명령으로 로그파일들을 삭제를 하신뒤 아파치 웹서버를 아래의 명령으로 재시작
하시길 바랍니다.
/etc/init.d/httpd restart
/var/log/httpd 디렉토리에서 access_log 와 error_log 의 사이즈를 확인해보시길 바랍니다.
보통 파일의 사이즈가 2G 가 넘어간다면, 웹서버가 웹로그가 쌓이는데 있어서 부하가 많이 걸리게 되므로 Proxy 의 오류가 생기게
됩니다.
그 원인은 로그파일을 분할하는 주기가 주간단위이기 때문에 그렇고, 이를 해결하기 위해서는 로그파일의 분할주기를 일일로 바꾸시
면 됩니다.
아래의 /etc/logrotate.conf 파일의 내용중 빨간색으로 된 부분을 참고하셔서 변경하시면 됩니다.
# see "man logrotate" for details
# rotate log files weekly
# weekly
daily
# keep 4 weeks worth of backlogs
# rotate 4
rotate 2
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
# monthly
dailly
minsize 1M
create 0664 root utmp
rotate 2
}
# system-specific logs may be also be configured here.
분할주기를 변경하신뒤 rm -rf /var/log/httpd/*_log 명령으로 로그파일들을 삭제를 하신뒤 아파치 웹서버를 아래의 명령으로 재시작
하시길 바랍니다.
/etc/init.d/httpd restart

야야
피키
무브온
이랑게
