Files
gartenmanager/frontend/nginx.conf

28 lines
671 B
Nginx Configuration File
Raw Normal View History

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# API-Proxy zum Backend
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;
}
# Health endpoint proxy
location /health {
proxy_pass http://backend:8000/health;
}
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
}