Configuring SSL With Virtual Hosts under Apache and CentOS
Two https can be served in one IP. You just need to verify that the virtual host configuration works.
Are you sure that your virtualhost works? You can use this config in site-available.
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog /var/www/example.com/error.log
CustomLog /var/www/example.com/requests.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName www.example2.com
DocumentRoot /var/www/example2.com/public_html
ServerAlias example2.com
ErrorLog /var/www/example2.com/error.log
CustomLog /var/www/example2.com/requests.log combined
</VirtualHost>
Follow the tutorial here
If you are sure about your virtual host configuration, then you can change the configuration like this:
<VirtualHost *:443>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog /var/www/example.com/error.log
CustomLog /var/www/example.com/requests.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/example/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/example/apache.key
</VirtualHost>
<VirtualHost *:443>
ServerName www.example2.com
DocumentRoot /var/www/example2.com/public_html
ServerAlias example2.com
ErrorLog /var/www/example2.com/error.log
CustomLog /var/www/example2.com/requests.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/example2/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/example2/apache.key
</VirtualHost>
Maybe you can refer to this for the ssl tutorial.
And finally you can access your web like this
https://example.com
https://example2.com