I'm managing a multi-language online store accessible from differents domain names, contributing to various languages.

The apache configuration is very complex and I must have a single file shared with the stores. I'd this in position until I needed to introduce SSL. If this involves apache and SSL certificates I will have to make a move like:

SetEnv is_es 0<br>
SetEnvIfNoCase Host .*es is_es 1<br>
SSLCertificateFile  /etc/ssl/certs/spanish.server.crt env=is_es<br>

This really is aparently difficult, apache informs me:

 <i>SSLCertificateFile takes one argument, SSL Server Certificate file (`/path/to/file' - PEM or DER encoded)</i>

I'm wondering if there's any workaround. Let me avoid getting different copies of the identical configuration and needing to propagate by hand any changes I wish to make. It's located on the devoted server, and so i am liberated to inflict changes towards the setup.

When you're on the https connection, the Host header is within the SSL encapsulation, which means you require the full SSL handshake before you decide to look for an hostname for the virtualhost.

You need to choose SSL certificates with SAN (Subject Alternative Names), this can allow that the single certificate for multiple hostnames. (or perhaps a wildcard cert)

All of the primary browsers supports it already:

And you will acquire one of the certs in the majors CAs: