From 96214a9a336e5b2ebe83f3cf3c5bebfc4f029515 Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 15 Oct 2025 01:48:10 +0900 Subject: [PATCH] =?UTF-8?q?debug:=20Nginx=20upstream=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D=EC=97=90=EC=84=9C=20=EC=96=B8=EB=8D=94=EC=8A=A4?= =?UTF-8?q?=EC=BD=94=EC=96=B4=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infra/main.tf b/infra/main.tf index 4e81075b..1b8fd69f 100644 --- a/infra/main.tf +++ b/infra/main.tf @@ -257,7 +257,7 @@ resource "aws_instance" "app" { echo "===== Nginx Configuration =====" cat > /etc/nginx/conf.d/tech-blog.conf <<'NGINX' - upstream spring_backend { + upstream springapp { server 127.0.0.1:8080 fail_timeout=0; } @@ -289,7 +289,7 @@ resource "aws_instance" "app" { real_ip_header CF-Connecting-IP; location / { - proxy_pass http://spring_backend; + proxy_pass http://springapp; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -305,13 +305,13 @@ resource "aws_instance" "app" { } location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf)$ { - proxy_pass http://spring_backend; + proxy_pass http://springapp; expires 30d; add_header Cache-Control "public, immutable"; } location /health { - proxy_pass http://spring_backend/actuator/health; + proxy_pass http://springapp/actuator/health; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;