Patched template file to work with api-gateway
This commit is contained in:
parent
68816390ee
commit
a3e285d7a8
1 changed files with 11 additions and 5 deletions
16
nginx.tmpl
16
nginx.tmpl
|
|
@ -240,17 +240,23 @@ server {
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_pass {{ trim $proto }}://{{ trim $upstream_name }};
|
uwsgi_pass {{ trim $proto }}://{{ trim $upstream_name }};
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|
||||||
|
{{ if eq $upstream_name "reverse_proxy" }}
|
||||||
|
proxy_pass {{ trim $proto }}://api-gateway:8080;
|
||||||
|
{{ else }}
|
||||||
proxy_pass {{ trim $proto }}://{{ trim $upstream_name }};
|
proxy_pass {{ trim $proto }}://{{ trim $upstream_name }};
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ 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) }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }}
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }}
|
||||||
include {{ printf "/etc/nginx/vhost.d/%s_location" $host}};
|
include {{ printf "/etc/nginx/vhost.d/%s_location" $host}};
|
||||||
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
|
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
|
||||||
include /etc/nginx/vhost.d/default_location;
|
include /etc/nginx/vhost.d/default_location;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue