forked from mtusi2026/mtusi2026lab3
27 lines
727 B
Nginx Configuration File
27 lines
727 B
Nginx Configuration File
events { worker_connections 1024; }
|
|
http {
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr warn;
|
|
resolver 127.0.0.11 valid=2s ipv6=off;
|
|
upstream api_backends {
|
|
zone api_backends 64k;
|
|
server api:8080 resolve max_fails=0;
|
|
keepalive 16;
|
|
}
|
|
server {
|
|
listen 8080;
|
|
location / {
|
|
proxy_pass http://api_backends;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $host;
|
|
proxy_connect_timeout 1s;
|
|
proxy_read_timeout 12s;
|
|
proxy_send_timeout 12s;
|
|
proxy_next_upstream error timeout http_502 http_503 http_504;
|
|
proxy_next_upstream_tries 2;
|
|
# POST is not transparently retried: client uses Idempotency-Key.
|
|
}
|
|
}
|
|
}
|