From 7f50fb9fa2bb3477b624026b91bc87e662cf14ec Mon Sep 17 00:00:00 2001 From: Gabriel Silva <86989966+dev-gabrieljs@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:19:16 -0300 Subject: [PATCH] Update nginx.conf --- nginx.conf | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/nginx.conf b/nginx.conf index 9d73c4a..355a123 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,19 +1,24 @@ + + +events { } + http { - upstream all { + least_conn; # Balanceamento com base em menor conexão ativa server 172.31.0.37:80; server 172.31.0.151:80; server 172.31.0.149:80; } server { - listen 4500; - location / { - proxy_pass http://all/; - } - } + listen 4500; + location / { + proxy_pass http://all/; + proxy_connect_timeout 5s; + proxy_send_timeout 10s; + proxy_read_timeout 10s; + proxy_set_header Host $host; + } + } } - - -events { }