Files
mtusi2026lab5/infra/nginx.conf
T

33 lines
908 B
Nginx Configuration File

upstream messenger_api {
zone messenger_api 64k;
resolver 127.0.0.11 valid=1s ipv6=off;
server api:8080 resolve max_fails=1 fail_timeout=2s;
keepalive 16;
}
server {
listen 8080;
server_name _;
client_max_body_size 11m;
client_body_buffer_size 64k;
client_body_timeout 15s;
proxy_connect_timeout 1s;
proxy_send_timeout 10s;
proxy_read_timeout 10s;
location / {
proxy_pass http://messenger_api;
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_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 2;
proxy_next_upstream_timeout 2s;
proxy_request_buffering off;
proxy_buffering off;
}
}