Hello,
I get a certificate from Gandi for a domain www.mondomaine.fr But for sql.mondomaine.fr I wanted to use a Self-Signed SSL certificate.
If I active sql.mondomaine.fr, the www.mondomaine.fr is using the self-signed certificate instead of the Gandiś one.
If I desactivate the sql. everything works fine.
How can I manage the use of different certificate ?
It seams that the first VirtualHost configuration is taking for every SSL VirtualHost.
Thank you for your help.
Here is my configuration :
For PHPMyAdmin :
<VirtualHost *:443>
# Chemin vers les données web
DocumentRoot /usr/share/phpmyadmin
ServerName sql.mondomaine.fr
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/phpmyadmin.pem
</VirtualHost>
For mondomaine.fr
<VirtualHost *:443>
ServerName www.mondomaine.fr
DocumentRoot /var/www/mondomaine/
CustomLog /var/log/apache2/secure_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/mondomaine.fr.crt
SSLCertificateKeyFile /etc/ssl/mondomaine.fr.key
SSLCACertificateFile /etc/ssl/GandiStandardSSLCA.pem
SSLVerifyClient None
</VirtualHost>
The configuration is correct because if the first VirtualHost read is PHPMyAdmin.pem ModSSL use this one and if it is mondomaine.fr.crt the first VirtualHost, Apache use this one.