-
Nginx conf 백엔드 서버 로드 밸런싱Spring/mini Project 2024. 2. 10. 11:13728x90반응형
Nginx의 장점 중 하나인 로드 밸런싱이 생각나서 어떻게 하는건지 찾아보다 까먹지 않도록 작성
http { upstream backend_servers { server backend1.example.com; server backend2.example.com; } server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html =404; } location /api { proxy_pass http://backend_servers; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } }728x90반응형'Spring > mini Project' 카테고리의 다른 글
Jenkins로 Maven 프로젝트 CI/CD - FreeStyle Project & PipeLine (1) 2024.02.10 Step1-3. 빌드 후 백그라운드 실행이 되지 않아 외우게 된 명령어 (1) 2024.02.08 Step1-2. EC2 프리티어 Jenkins 서버 터지는 현상 해결 (0) 2024.02.07 Step1-1. Jenkins에서 GitHub Webhook 사용 및 실행 (0) 2024.02.06 Step1. Jenkins 설치 후 프로젝트 Build 및 Start (1) 2024.02.06