Skip to content
Snippets Groups Projects
Commit 60d93e2a authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Completely removes default domain

parent 82f7f27d
No related branches found
No related tags found
No related merge requests found
{{$default_service_value := getv "/services/default"}}
{{$default_service := json $default_service_value}}
{{$default_url := printf "/services/%s/%s" $default_service.app $default_service.hostname}}
{{$default_value := getv $default_url}}
{{$default := json $default_value}}
{{$default := json $default_value}}
global global
maxconn 4096 maxconn 4096
user haproxy user haproxy
...@@ -22,7 +16,7 @@ defaults ...@@ -22,7 +16,7 @@ defaults
frontend https-in frontend https-in
mode http mode http
bind *:443 ssl crt-list /etc/haproxy/crt-list crt /etc/haproxy/approved-certs/{{$default_service.hostname}}.pem bind *:443 ssl crt-list /etc/haproxy/crt-list crt /etc/haproxy/approved-certs/default.pem
reqadd X-Forwarded-Proto:\ https reqadd X-Forwarded-Proto:\ https
{{range $app := lsdir "/services"}} {{range $app := lsdir "/services"}}
{{$hostnames := printf "/services/%s/*" $app}} {{$hostnames := printf "/services/%s/*" $app}}
...@@ -36,8 +30,6 @@ mode http ...@@ -36,8 +30,6 @@ mode http
{{end}} {{end}}
{{end}} {{end}}
default_backend {{$default_service.hostname}}
frontend http-in frontend http-in
bind *:80 bind *:80
{{range $app := lsdir "/services"}} {{range $app := lsdir "/services"}}
......
...@@ -26,6 +26,7 @@ systemctl daemon-reload ...@@ -26,6 +26,7 @@ systemctl daemon-reload
# Configure and start HAproxy # Configure and start HAproxy
mkdir -p /data/runtime/haproxy/approved-certs mkdir -p /data/runtime/haproxy/approved-certs
cp /data/indiehosters/scripts/unsecure-certs/indiehosters.dev.pem /data/runtime/haproxy/approved-certs/default.pem
systemctl enable haproxy-confd.service systemctl enable haproxy-confd.service
systemctl start haproxy-confd.service systemctl start haproxy-confd.service
systemctl enable haproxy.path systemctl enable haproxy.path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment