Cannot multiplex x.d.com (TLS) and y.d.com (non-TLS) on same listener

I’m trying to have a couple of virtual hosts, one being served with TLS from caddy itself and the other one being proxied by caddy to another (TLS) backend server.

My Caddyfile (stripped down version) looks like this:

 https://x.d.com {
     root /var/www/html
     log x.d.com.access.log
 }
 https://y.d.com {
     proxy / localhost:4443
     tls off
}

and I’m getting the following when launching caddy:

2016/07/05 15:58:05 cannot multiplex x.d.com (TLS) and y.d.com (not TLS) on same listener

Is there any way to get this working?

Thanks.

Juan

No, because you cannot serve HTTP and HTTPS on the same port. You’re asking both sites to be served on HTTPS (port 443) but you tell the second one not to use TLS (resulting in plain HTTP). So remove tls off or change the port on the second site.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.