I currently have Apache setup to use a certificate on all my domains using these settings in ssl.conf:
<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/mycert.crt
SSLCertificateKeyFile /etc/httpd/conf/mykey.key
SSLCertificateChainFile /etc/httpd/conf/digicert/DigiCertCA.crt
</VirtualHost>
I would like to use a different self-signed certificate for one domain/virtual host on the server. I tried adding this to my httpd.conf file, but the old certificate is still being presented to the browser.
<VirtualHost *:443>
ServerName myotherdomain.com
DocumentRoot /var/www/symfony/web
SSLEngine on
SSLCertificateFile /etc/httpd/conf/selfsigned.crt
SSLCertificateKeyFile /etc/httpd/conf/selfsigned.key
SSLCertificateChainFile /etc/httpd/conf/digicert/DigiCertCA.crt
</VirtualHost>
Is there a way to set this up so that this one domain using a different certificate than the others?
You should use
NameVirtualHost *:443
prior to yourVirtualHost
: