httpd.conf 기본값 그대로 두니 로그 파일 하나에 log가 쌓여서 파일 하나 크기가 매우 커지네요.
하루치씩 저장되도록
httpd.conf 에
CustomLog "|/어쩌구저쩌구경로/bin/rotatelogs /어쩌구저쩌구경로/logs/access_log.%Y%m%d 86400" common
암호같은 86400은 하루를 초로 나타낸 것.
CustomLog "|/어쩌구저쩌구경로/bin/rotatelogs -l /어쩌구저쩌구경로/logs/access_log.%Y%m%d 86400" common
세벌 https://sebuls.blogspot.kr/
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
암호같은 86400은 하루를 초로 나타낸 것.
암호같은 86400은 하루를 초로 나타낸 것.
이런 식으로 rotatelogs 다음에 마이너스 엘 넣어주면 한국이면 한국 지역 시간 기준으로 파일을 나눔
rotatelogs 에 대한 설명은
https://httpd.apache.org/docs/2.4/en/programs/rotatelogs.html
참고하셔요.
세벌 https://sebuls.blogspot.kr/
댓글 달기