Files
mtusi2026lab5/infra/nginx.conf
T

34 lines
756 B
Nginx Configuration File

worker_processes auto;
error_log /dev/stderr warn;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
access_log off;
client_max_body_size 12m;
proxy_http_version 1.1;
proxy_set_header Connection "";
gzip off;
upstream messenger_api {
server api-1:8080 max_fails=0;
server api-2:8080 max_fails=0;
}
server {
listen 8080;
location / {
proxy_pass http://messenger_api;
proxy_connect_timeout 1s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
proxy_next_upstream error timeout http_502 http_503 non_idempotent;
proxy_next_upstream_tries 2;
proxy_next_upstream_timeout 3s;
}
}
}