Tomcat(톰캣) Log(로그) 설정
# Web&WAS/Tomcat2022. 9. 14. 17:37Tomcat(톰캣) Log(로그) 설정

톰캣 설치 경로의 conf폴더로 이동하여 server.xml파일을 열어 아래정보 확인 로그 설정옵션 directory access log가 생성되는 폴더 fileDateFormat access log rotate 주기를 설정. 기본값은 yyyy-MM-dd로 매일 rotate됨. 시간별로 하기 위해서는 yyyy-MM-dd.HH 로 수정 prefix access log 파일의 접두사 suffix access log 파일의 접미사 pattern access log 포맷 패턴옵션 %a 원격 IP 주소 %r 요청의 첫번째 줄 (메소드와 요청 URI) %A 로컬 IP 주소 %s HTTP 상태 코드 %b HTTP 헤더를 제외한 전송 크기, 없다면 ‘-’ %S 사용자 세션 ID %B HTTP 헤더를 제외한 전송 크기 ..

nginx 로드밸런싱
# Web&WAS/Nginx2022. 5. 17. 19:27nginx 로드밸런싱

upstream 만들기 upstream { server : ... server : } upstream balance { server localhost:8080; #tomcat1 server localhost:8090; #tomcat2 #loadbalancer type defualt is roundrobin } server { listen 80; location / { proxy_pass http://balance; } } Load balancing 알고리즘 nginx는 여러가지 Load balancing 알고리즘을 지원한다. 분배하다 기준이 비슷한 정도의 서버가 여러대 있다면 그중에서 Round-robin를 돌린다. ■ hash : 바로 뒤에 따라오는 값에 따라 해싱하여 분배한다. hash $remote..

nginx php 연동
# Web&WAS/Nginx2022. 5. 17. 07:50nginx php 연동

#server 구문에 추가 error_page 500 502 503 504 /usr/local/nginx/html/50x.html; location = /usr/local/nginx/html/50x.html { root html; location ~ \.php$ { #PHP-FPM에서 지정한 IP와 포트를 입력합니다. fastcgi_pass 192.168.85.177:9001; #PHP-FPM에 전달하게될 스크립트 파일명 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #FastCGI 관련 구성 설정 정보를 포함합니다. include fastcgi_params; }

nginx SSL 설정 및 적용
# Web&WAS/Nginx2022. 5. 17. 07:48nginx SSL 설정 및 적용

# HTTPS server # server { listen 443 ssl; server_name nikeshoes.shop; ssl_certificate /etc/letsencrypt/live/nikeshoes.shop/cert.pem; ssl_certificate_key /etc/letsencrypt/live/nikeshoes.shop/privkey.pem; ssl_client_certificate /etc/letsencrypt/live/nikeshoes.shop/fullchain.pem; ssl_protocols TLSv1.2; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ss..

nginx 설치
# Web&WAS/Nginx2022. 5. 17. 07:48nginx 설치

https://nginx.org nginx news 2021-11-18unit-1.26.0 version has been released, featuring multiple improvements in static content serving, application-wide PHP opcache, and a number of bugfixes. nginx.org 설치환경 centos7 nginx, openssl, pcre, zlib 다운로드 및 압축해제 $ wget https://nginx.org/download/nginx-1.20.2.tar.gz $ tar -xvf nginx-1.20.2.tar.gz $ cd nginx-1.20.2 $ wget https://github.com/PCRE2Project/p..

image