server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; resolver 127.0.0.11 valid=10s ipv6=off; client_max_body_size 80m; location ^~ /api/ { set $docker_backend_svc backend; proxy_pass http://$docker_backend_svc:8000$request_uri; proxy_http_version 1.1; 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; proxy_connect_timeout 60s; proxy_send_timeout 600s; proxy_read_timeout 600s; } location / { try_files $uri $uri/ /index.html; } }