Files
2026-06-01 13:26:56 +00:00

29 lines
714 B
Nginx Configuration File

server {
listen 80;
server_name _;
# Frontend static files
root /var/www/html;
index index.html;
# API reverse proxy zum Backend
location /api/ {
proxy_pass http://backend:8000/api/;
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;
}
location /health {
proxy_pass http://backend:8000/health;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Alles andere → index.html (SPA fallback)
location / {
try_files $uri $uri/ /index.html;
}
}