|
@@ -168,7 +168,12 @@ server {
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
location / {
|
|
location / {
|
|
|
|
+ {{ if eq $proto "uwsgi" }}
|
|
|
|
+ include uwsgi_params;
|
|
|
|
+ uwsgi_pass {{ trim $proto }}://{{ trim $host }};
|
|
|
|
+ {{ else }}
|
|
proxy_pass {{ trim $proto }}://{{ trim $host }};
|
|
proxy_pass {{ trim $proto }}://{{ trim $host }};
|
|
|
|
+ {{ end }}
|
|
{{ 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) }};
|
|
@@ -197,7 +202,12 @@ server {
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
location / {
|
|
location / {
|
|
|
|
+ {{ if eq $proto "uwsgi" }}
|
|
|
|
+ include uwsgi_params;
|
|
|
|
+ uwsgi_pass {{ trim $proto }}://{{ trim $host }};
|
|
|
|
+ {{ else }}
|
|
proxy_pass {{ trim $proto }}://{{ trim $host }};
|
|
proxy_pass {{ trim $proto }}://{{ trim $host }};
|
|
|
|
+ {{ end }}
|
|
{{ 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) }};
|