From 804f07612da26e21ad7c8929431923a426ee7a6e Mon Sep 17 00:00:00 2001 From: Alireza David Date: Fri, 28 Oct 2016 12:53:17 +0330 Subject: [PATCH] add keepalive to upstream directive (hard code in template) --- nginx.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index 9eb9520..bf92ff0 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -47,7 +47,7 @@ proxy_http_version 1.1; proxy_buffering off; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $proxy_connection; +proxy_set_header Connection ""; 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 $proxy_x_forwarded_proto; @@ -101,6 +101,8 @@ upstream {{ $host }} { {{ end }} {{ end }} {{ end }} + + keepalive 10; } {{ $default_host := or ($.Env.DEFAULT_HOST) "" }}