Files
mtusi2026lab4/infra/nginx.conf
T
2026-11-05 18:08:31 +03:00

27 lines
675 B
Nginx Configuration File

resolver 127.0.0.11 valid=5s ipv6=off;
upstream messenger_api {
zone messenger_api 64k;
server api:8080 resolve max_fails=1 fail_timeout=2s;
}
server {
listen 8080;
server_name _;
client_max_body_size 11m;
client_body_timeout 20s;
location / {
proxy_pass http://messenger_api;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_request_buffering off;
proxy_connect_timeout 2s;
proxy_send_timeout 20s;
proxy_read_timeout 20s;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 2;
}
}