From ea63b832149f5f79dc2f72525e6c6d78040e8355 Mon Sep 17 00:00:00 2001 From: Josh Sandlin Date: Fri, 31 Jul 2026 14:44:38 -0400 Subject: [PATCH] move zot and web to upstreams with keepalives and remove websocket adjacent headers --- ansible/templates/nginx_site.conf.j2 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ansible/templates/nginx_site.conf.j2 b/ansible/templates/nginx_site.conf.j2 index ecc2c55..4dbde6d 100644 --- a/ansible/templates/nginx_site.conf.j2 +++ b/ansible/templates/nginx_site.conf.j2 @@ -17,15 +17,12 @@ server { # Next.js web app location / { - proxy_pass http://127.0.0.1:3000; + proxy_pass http://ttlsh_web; proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_cache_bypass $http_upgrade; } # Block listing catalog @@ -41,12 +38,25 @@ server { proxy_send_timeout 3600s; proxy_read_timeout 3600s; send_timeout 3600s; - proxy_pass http://127.0.0.1:5000; + proxy_pass http://ttlsh_zot; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host; + proxy_set_header Connection ""; proxy_request_buffering off; } } + +upstream ttlsh_zot { + server 127.0.0.1:5000; + keepalive 64; + keepalive_timeout 60s; +} + +upstream ttlsh_web { + server 127.0.0.1:3000; + keepalive 32; + keepalive_timeout 60s; +} \ No newline at end of file