From 7718eefcf369e9e83c938c0bae478bac952f9375 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sun, 19 Nov 2023 21:47:52 +0100 Subject: [PATCH] Update prod nginx config --- nginx.conf | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index a534a41..d4ec2d9 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,7 +1,11 @@ -upstream delphi { +upstream delphi-prod-backend { server 127.0.0.1:4321; } +upstream delphi-prod-frontend { + server 127.0.0.1:4173; +} + server { server_name delphi.market; listen 80; @@ -25,7 +29,16 @@ server { proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Prefix /; - proxy_pass http://delphi$request_uri; + proxy_pass http://delphi-prod-frontend$request_uri; + } + + location /api { + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Prefix /; + proxy_pass http://delphi-prod-backend$request_uri; } include letsencrypt.conf;