Apache 2.4.9 fails after enabling ssl module and setting up ssl certificate Apache 2.4.9 fails after enabling ssl module and setting up ssl certificate php php

Apache 2.4.9 fails after enabling ssl module and setting up ssl certificate


I ran into the same problem.Now I resolved it.

You included

/private/etc/apache2/extra/httpd-ssl.conf 

in httpd.conf.

So you still need to set following keys in 'httpd-ssl.conf'

SSLCertificateFile "path to your crt"SSLCertificateKeyFile "path to your key"

Hope it is helpful.


I encountered this just today after upgrading to MacOS High Sierra version 10.13.6.My virtual hosts with SSL were working fine before the upgrade.Then today, when I tried to start up my Apache web server, I got this error:

[Fri Jul 20 10:51:06.021778 2018] [ssl:emerg] [pid 2236] AH02572: Failed to configure at least one certificate and key for work.localweb.com:80[Fri Jul 20 10:51:06.022024 2018] [ssl:emerg] [pid 2236] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned[Fri Jul 20 10:51:06.022037 2018] [ssl:emerg] [pid 2236] AH02312: Fatal error initialising mod_ssl, exiting.AH00016: Configuration Failed

Check my apache version and it is now 2.4.33.Apparently in this version you will need to put the SSLCertificateFile and SSLCertificateKeyFile entries in the virtual host itself.So, I copied the entries from extra/httpd-ssl.conf and put it in every SSL virtual host that I had configured.

<VirtualHost *:443>  ServerAdmin me@mymail.com  ServerName work.localweb.com  SSLCertificateFile "/private/etc/apache2/server.crt"  SSLCertificateKeyFile "/private/etc/apache2/server.key"  ......</VirtualHost>

Then the start up works again.


I also had the same problem. In my case I had also just included extra/httpd-ssl.conf as some of the others had mentioned.As said above, make sure you have entries in this file for

SSLCertificateFile "/usr/local/etc/apache24/ssl.crt/mydomaincertificate.crt"

SSLCertificateKeyFile "/usr/local/etc/apache24/ssl.key/myprivatekey.key"

Even though the same entries are in extra/httpd-vhosts.conf for my main domain.I also had to make sure that in httpd.conf the "ServerName" entry matched a name in the certificate.

While this is off no use to the OP, it may be of use to someone like me searching on this error after setting up SSL