title: Apache 2.4.9 fails after enabling ssl module and setting up ssl certificate
body: <p>Apache throws the following errors after attempting to set up ssl certificates:</p>
  
  <pre><code>[ssl:emerg] [pid 30907] AH02572: Failed to configure at least one certificate and key for localhost:443
  [ssl:emerg] [pid 30907] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
  [ssl:emerg] [pid 30907] AH02312: Fatal error initialising mod_ssl, exiting.
  </code></pre>
  
  <p>I using MAC OS:Yosemite, PHP 5.5.20, Apache 2.4.9</p>
  
  <p>and have followed these steps to generate my ssl certificate from 
  (<a href="http://www.akadia.com/services/ssh_test_certificate.html" rel="noreferrer">http://www.akadia.com/services/ssh_test_certificate.html</a>)</p>
  
  <pre><code>cd /etc/apache2/
  sudo mkdir certs                                        
  cd certs                                                
  sudo openssl genrsa -des3 -out server.key 1024          
  sudo openssl req -new -key server.key -out server.csr
  
    Country Name (2 letter code) [GB]:US
    State or Province Name (full name) [Berkshire]:California 
    Locality Name (eg, city) [Newbury]:LA
    Organization Name (eg, company) [My Company Ltd]:Company
    Organizational Unit Name (eg, section) []:
    Common Name (eg, your name or your server's hostname) []:dev.test.local
    Email Address []:username@gmail.com
    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
  
  sudo cp server.key server.key.org     
  sudo openssl rsa -in server.key.org -out server.key
  sudo openssl x509 -req -days 730 -in server.csr -signkey server.key -out server.crt  
  </code></pre>
  
  <p>Next I have the following set up for my apache config files:</p>
  
  <p><strong>etc/apache2/httpd.conf:</strong></p>
  
  <pre><code>LoadModule ssl_module libexec/apache2/mod_ssl.so
  LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so
  Include /private/etc/apache2/extra/httpd-ssl.conf
  </code></pre>
  
  <p><strong>etc/apache2/extra/httpd-ssl.conf:</strong></p>
  
  <pre><code>Listen 443
  SSLPassPhraseDialog  builtin
  &lt;VirtualHost _default_:443&gt;
  SSLEngine on
  Mutex sysvsem default # Added after seeing mutex issues for apache 2.4, http://stackoverflow.com/questions/13969272/apache-sslmutex-issue
  </code></pre>
  
  <p><strong>etc/apache2/extra/httpd-vhosts.conf:</strong></p>
  
  <pre><code>&lt;VirtualHost *:443&gt;
  
      ServerName dev.test.local
      DocumentRoot "/Users/username/Sites/test/public"
  
      &lt;Directory "/Users/username/Sites/test/public"&gt;
           Options Indexes FollowSymLinks MultiViews
           AllowOverride All
           Order allow,deny
           allow from all
      &lt;/Directory&gt;
  
      SSLEngine on       
      SSLCertificateFile    /etc/apache2/certs/server.crt
      SSLCertificateKeyFile /etc/apache2/certs/server.key
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>After restarting and running apache config test it looks as though there are no issues:</p>
  
  <pre><code>sudo apachectl restart
  sudo apachectl configtest
  [Tue Jan 06 13:56:01.480270 2015] [so:warn] [pid 31636] AH01574: module php5_module is already loaded, skipping
  Syntax OK
  </code></pre>
  
  <p>Help is greatly appreciated and I am happy to supply more information if needed.</p>