diff --git a/daemon.go b/daemon.go index 804e6c0..f55fba5 100644 --- a/daemon.go +++ b/daemon.go @@ -292,7 +292,9 @@ func (d *Daemon) addVhost(binding string, w http.ResponseWriter) *Vhost { w.Header().Set("Access-Control-Allow-Origin", "*") d.loggedHandler.AddVhost(vhost) - d.restartTLS() + if d.enableTLS() { + d.restartTLS() + } err = addToHosts(vhost.Host) if err != nil {