diff --git a/nginx/nginx_securefit.conf b/nginx/nginx_securefit.conf index ef09d3b..d3971ee 100644 --- a/nginx/nginx_securefit.conf +++ b/nginx/nginx_securefit.conf @@ -1,19 +1,17 @@ server { - listen 80; - server_name tdt4242-04.idi.ntnu.no; + listen ${PORT_PREFIX}${GROUP_ID}${DEV_POSTFIX}${GATEWAY_POSTFIX}; + server_name $DOMAIN; - # Proxy requests to the Django backend - location /api/ { - proxy_pass http://backend:8000; + location / { + proxy_pass http://frontend:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - # Serve the React frontend - location / { - proxy_pass http://frontend:3000; + location /api/ { + proxy_pass http://backend:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;