diff --git a/deploy/nginx_mabea.conf.template b/deploy/nginx_mabea.conf.template index eee4eae..9880e84 100644 --- a/deploy/nginx_mabea.conf.template +++ b/deploy/nginx_mabea.conf.template @@ -23,11 +23,20 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - location / { + location /api/ { proxy_pass http://127.0.0.1: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; proxy_set_header X-Forwarded-Proto $scheme; } + + # React-PWA (Sprint 7): statische Build-Ausgabe von frontend/dist. + # try_files statt 404 bei Client-Routen, da react-router-dom im Browser routet. + root /var/www/mabea; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } }