I´m having problems setting up a SSL cert. It seems Apache2 does not serve the cert defined in the vhost but the one in default-ssl (which seems to be expired)


<VirtualHost _default_:443>
    ServerAdmin webmaster@localhost
    SSLEngine on
    SSLCertificateFile    /etc/ssl/certs/webserver.pem
    SSLCertificateKeyFile /etc/ssl/private/webserver.key

Vhost Setup

   <VirtualHost *:443>
        ServerName sub.mydomain.com
        DocumentRoot /var/www/
        SSLEngine on
        SSLCertificateFile /etc/ssl/private/mydomain.crt
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-mydomain-snakeoil.key
        SSLCertificateChainFile /etc/apache2/mydomain.crt
        SetEnvIf User-Agent ".*MSIE.*" \
          nokeepalive ssl-unclean-shutdown \
          downgrade-1.0 force-response-1.0

Happy for any hint what I´m doing wrong.


  • You don't have .pem in your vhost setup – Froggiz Nov 12 '15 at 15:22
  • .pem can have a variety of extensions (.pem, .key, .cer, .cert, more) link – toni Nov 12 '15 at 15:30
  • So did you checked if you didn't messed with your two same named .crt files ? – Froggiz Nov 12 '15 at 15:41
  • mhh mhh mhh true, but never had problems with this on identical machines … I assumed it has something to do with the wildcard, that´s why I tried every combination IP, Domainname,… no change – toni Nov 12 '15 at 15:44
  • Try to change _default_ by *, i got almost the same conf on my apache and SSL works fine – Froggiz Nov 12 '15 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.