From 2c1871d5baf82836a4951f13584890ae8972b8ea Mon Sep 17 00:00:00 2001 From: Wentao Lyu <35-wentao.lyu@users.noreply.git.stereye.tech> Date: Wed, 29 Mar 2023 16:11:43 +0800 Subject: [PATCH] fix: update url rule in nginx --- client/nginx.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/nginx.conf b/client/nginx.conf index 1924aded1..96cfe345e 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -2,14 +2,14 @@ server { listen 80; server_name localhost; - location / { - # Serve your React app - root /usr/share/nginx/html; - index index.html; - } - location /api { # Proxy requests to the API service proxy_pass http://api:3080/api; } + + location / { + # Serve your React app + root /usr/share/nginx/html; + try_files $uri $uri/ /index.html; + } }