azurelamp

Configure multiple SSL domains on the same IP address

There is an extension to the SSL protocol called “Server Name Indication”. It allows you to use only one IP address for several SSL-protected sites. The only drawback is that some older web browsers do not support it. The example Apache configuration is shown below:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName my-wordpress.example.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName my-sugarcrm.example.com
DocumentRoot "/opt/bitnami/apps/sugarcrm/htdocs"
</VirtualHost>

Listen 443
NameVirtualHost *:443

<VirtualHost *:443>
SSLEngine on
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
ServerName my-wordpress.example.com
SSLCertificateFile "/opt/bitnami/apache2/conf/my-wordpress.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/my-wordpress.key"
</VIrtualHost>

<VirtualHost *:443>
SSLEngine on
DocumentRoot "/opt/bitnami/apps/sugarcrm/htdocs"
ServerName my-sugarcrm.example.com
SSLCertificateFile "/opt/bitnami/apache2/conf/my-sugarcrm.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/my-sugarcrm.key"
</VirtualHost>

You can learn more at the following pages: