From b5be500845c565c50e7f007c8b5dd2aac3a2bb0a Mon Sep 17 00:00:00 2001 From: Albert Murillo Date: Tue, 16 Dec 2014 23:54:07 +0100 Subject: [PATCH] Type mismatch dollar vs percent --- nginx.tmpl | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nginx.tmpl b/nginx.tmpl index ebf0f33..fd5d2e9 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -68,9 +68,6 @@ upstream {{ $host }} { {{ end }} } -{{/* Get the htpasswd file defined by containers w/ the same vhost */}} -{{ $htpasswdFile := (first (groupByKeys $containers "Env.HTPASSWD_FILE”)) }} - {{/* Get the first cert name defined by containers w/ the same vhost */}} {{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }} @@ -109,9 +106,9 @@ server { location / { proxy_pass http://{{ $host }}; - {{ if (exists (printf "/etc/nginx/htpasswd/$s" $host)) }} + {{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }} auth_basic "Restricted {{ $host }}"; - auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/$s" $host }}; + auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }}; {{ end }} } } @@ -122,9 +119,9 @@ server { location / { proxy_pass http://{{ $host }}; - {{ if (exists (printf "/etc/nginx/htpasswd/$s" $host)) }} + {{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }} auth_basic "Restricted {{ $host }}"; - auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/$s" $host }}; + auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }}; {{ end }} } }