Variation on http://stackoverflow.com/a/16528383/680454
This commit is contained in:
parent
085bcf383d
commit
e4287b3a48
1 changed files with 1 additions and 11 deletions
|
@ -32,17 +32,7 @@ mode http
|
||||||
|
|
||||||
frontend http-in
|
frontend http-in
|
||||||
bind *:80
|
bind *:80
|
||||||
{{range $app := lsdir "/services"}}
|
redirect scheme https code 301
|
||||||
{{$hostnames := printf "/services/%s/*" $app}}
|
|
||||||
{{range gets $hostnames}}
|
|
||||||
{{$hostname := .Key}}
|
|
||||||
{{$data := json .Value}}
|
|
||||||
# {{base $hostname}}:
|
|
||||||
acl is_{{base $hostname}} hdr(host) -i {{base $hostname}}
|
|
||||||
acl is_{{base $hostname}} hdr(host) -i www.{{base $hostname}}
|
|
||||||
use_backend {{base $hostname}} if is_{{base $hostname}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{range $app := lsdir "/services"}}
|
{{range $app := lsdir "/services"}}
|
||||||
{{$hostnames := printf "/services/%s/*" $app}}
|
{{$hostnames := printf "/services/%s/*" $app}}
|
||||||
|
|
Loading…
Reference in a new issue