본문 바로가기
[AWS-FRF]/EC2

[중요] NGINX / JAVA 서버 로그 주기 설정 작업 !!

by METAVERSE STORY 2025. 3. 12.
반응형

 

 

## Nginx 프론트앤드
1) 로그 보관주기 설정 : /etc/logrotate.d/nginx
2) 로그 위치 : /var/log/nginx/
 

-----------------------------------------------

/var/log/nginx/*.log {
create 0640 nginx root
weekly
rotate 52
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true
endscript
}
------------------------------------------------------------
 

 

## JAVA 백앤드
1) 로그 보관 주기 변경 : /home/XXX/service/각 서비스 폴더/config/logback.xml

30 ==> 365 변경

 

 

 

반응형

댓글