Update nginx.tmpl
- Add VIRTUAL_PROTO=custome
This commit is contained in:
parent
c4ad18fecc
commit
76ba6b6f58
1 changed files with 34 additions and 28 deletions
10
nginx.tmpl
10
nginx.tmpl
|
@ -51,6 +51,11 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "location" }}
|
||||
{{ if eq .Proto "custome" }}
|
||||
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" .Host)) }}
|
||||
include {{ printf "/etc/nginx/vhost.d/%s_location" .Host }};
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
location {{ .Path }} {
|
||||
{{ if eq .NetworkTag "internal" }}
|
||||
# Only allow traffic from internal clients
|
||||
|
@ -78,11 +83,12 @@
|
|||
{{ if (exists (printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) )) }}
|
||||
include {{ printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) }};
|
||||
{{ else 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") }}
|
||||
include /etc/nginx/vhost.d/default_location;
|
||||
{{ end }}
|
||||
}
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "upstream" }}
|
||||
|
|
Loading…
Reference in a new issue