From 9ff8fadea715cb0865769eb68f326ff799889abe Mon Sep 17 00:00:00 2001 From: Hyein Jeong Date: Tue, 26 Nov 2024 13:35:39 +0900 Subject: [PATCH] =?UTF-8?q?[BE][Chore]=20#266=20:=20nginx=EC=97=90?= =?UTF-8?q?=EC=84=9C=20react=20=EB=9D=BC=EC=9A=B0=ED=84=B0=EC=99=80=20?= =?UTF-8?q?=ED=98=B8=ED=99=98=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - nginx에서 react 앱의 모든 url을 index.html로 리다이렉트 --- nginx.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nginx.conf b/nginx.conf index a7eccb1e..8c5039a7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -47,10 +47,10 @@ http { } location / { - proxy_pass http://frontend:80; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + root /usr/share/nginx/html; + index index.html; + + try_files $uri /index.html; } } }