Ask HN: How Wix.com or Wordpress.com handle SSL-Certificates?
I am developing a software for niche market. The software works like a website builder and my clients can use their custom domains. I use Apache and I have a single virtual host. The application fetches the right configuration and content with $HTTP_HOST variable.
Everything works fine, but the problem begins with SSL certificates. I am searching a solution where I can add new domains without changing Apache configuration, something like this (I know, it doesn’t work).
<VirtualHost *:443>
ServerName ${HTTP_HOST}
SSLEngine on
SSLCertificateFile /path/to/${HTTP_HOST}.cert
SSLCertificateKeyFile /path/to/${HTTP_HOST}.key
</VirtualHost>
I have googled a lot but found no solution. Is there any solution? How the all the website builder like, wix.com, jimdo.com and wordpress.com handle this problem?
EDIT: I realize after posting that you may be asking about the syntax of VirtualHost in Apache, and not about how TLS works in this use case.