Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache SSL multi domain

Tags:

ssl

apache

We have a web application that hosts multiple websites for our customers under different domains. All these domains are hosted on an single apache vhost, the logical seperation into different sites is done by the software.

We would like to offer ssl-support for some of these virtual websites. Pricipically that should be no problem, as after an ssl connection is established, the software can use the host: header to route to the correct website.

But: How do I tell apache to serve the correct certificate, depending on the requested host?

Is there a possibity to map certs to domains, e.g. with something like:

SSLCertificateFile file

All help is appreciated!

like image 867
D.Bel ca Avatar asked Jul 24 '26 07:07

D.Bel ca


2 Answers

In addition to what @bobince said, you can have multiple host names in the same certificate (not necessarily with wild-cards or sub-domains) using multiple DNS entries in the subject alternative name extension. (CAs are likely to charge a much higher fee for this type of certificate).

like image 150
Bruno Avatar answered Jul 26 '26 11:07

Bruno


This is not possible. Since the host header is only sent after the SSL connection is set up, the server can not serve a SSL certificate depending on the host.

Server Name Indication tries to fix this, but is not implemented on all browsers.

like image 20
Sjoerd Avatar answered Jul 26 '26 12:07

Sjoerd