server { listen 80; root /usr/share/nginx/html; resolver 127.0.0.11 valid=10s ipv6=off; location / { try_files $uri $uri/ /index.html; } location = /api/health { set $upstream api; proxy_pass http://$upstream:8080/health; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } location /api/ { set $upstream api; proxy_pass http://$upstream:8080$request_uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }