Type mismatch dollar vs percent
This commit is contained in:
parent
d931fb7875
commit
b5be500845
1 changed files with 4 additions and 7 deletions
11
nginx.tmpl
11
nginx.tmpl
|
@ -68,9 +68,6 @@ upstream {{ $host }} {
|
||||||
{{ end }}
|
{{ 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 */}}
|
{{/* Get the first cert name defined by containers w/ the same vhost */}}
|
||||||
{{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }}
|
{{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }}
|
||||||
|
|
||||||
|
@ -109,9 +106,9 @@ server {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://{{ $host }};
|
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 "Restricted {{ $host }}";
|
||||||
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/$s" $host }};
|
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,9 +119,9 @@ server {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://{{ $host }};
|
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 "Restricted {{ $host }}";
|
||||||
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/$s" $host }};
|
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue