Using mutliple ssl certificates for tls server?

I have multiple ssl certificates for multiple pages. I want to run all pages on the same server on the same port, so I need to create one single https server and then proxy the request based on the hostname to the sites.

The problem here is, that I can't find out, how i can use multiple ssl certificates and ever the right certificate is used.

Is this even possible?

Combining the certificates to a wildcard one is not possible by the way, since I use different top level domains for the sites. For example:

  • www.a.xx
  • www.a.yy
  • www.b.xx
  • www.b.yy
  • c.xx
  • c.yy

You can only do it for browsers (and in your case the proxy) supporting Server Name Indication. Not all browsers are supported though, so if you want it completely "generic", you need to use separate IPs for the different sites.

(Granted, most modern browsers support it, so it depends on your "support matrix" for the sites)