worker_processes 1; pid /tmp/nginx.pid; error_log /dev/stderr warn; worker_shutdown_timeout 5s; events { worker_connections 1024; } http { log_format upstream '$request_method $uri status=$status upstream=$upstream_addr upstream_status=$upstream_status time=$request_time'; access_log /dev/stdout upstream; resolver 127.0.0.11 valid=1s ipv6=off; resolver_timeout 1s; include /tmp/backends.conf; server { listen 8080; server_tokens off; client_max_body_size 256k; client_header_timeout 5s; client_body_timeout 5s; keepalive_timeout 2s; location / { proxy_pass http://api_backend; proxy_http_version 1.1; proxy_set_header Connection ""; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 1s; proxy_read_timeout 8s; proxy_send_timeout 8s; proxy_next_upstream error timeout http_502 http_503 http_504; proxy_next_upstream_tries 2; proxy_next_upstream_timeout 9s; } } }