title: Installing SSL on Apache - Syntax Error in openssl.cnf
body: <p>I'm trying to learn how to get ssl up and running on an apache 2.4 webserver (Windows Server 2012). I had the web server and PHP up and running perfectly fine without SSL.</p>
  
  <ul>
  <li>I Generated my cert and key and placed them in C:\Apache24\conf</li>
  <li>I Modified httpd.conf in the following way:</li>
  </ul>
  
  <blockquote>
  <pre><code>LoadModule ssl_module modules/mod_ssl.so
  Include C:/Apache24/conf/openssl.cnf
  </code></pre>
  </blockquote>
  
  <ul>
  <li>I modified c:/Apache24/conf/extra/httpd-ssl.conf in the following way:</li>
  </ul>
  
  <blockquote>
    <p><code>SSLCertificateFile "c:/Apache24/conf/server.crt"
    SSLCertificateKeyFile "c:/Apache24/conf/server.key"
    DocumentRoot "c:/Apache24/htdocs"</code></p>
  </blockquote>
  
  <ul>
  <li>Added the following System Environment Variable</li>
  </ul>
  
  <blockquote>
    <p><code>Variable Name: OPENSSL_CONF
    Variable Value: C:\Apache24\conf\openssl.cnf</code></p>
  </blockquote>
  
  <p>I've hit a point where apache will not start due to the following error.</p>
  
  <p>running httpd -t in powershell gives the result:</p>
  
  <pre><code>: Syntax error on line 8 of C:/Apache24/conf/openssl.cnf:
  Invalid command 'HOME', perhaps misspelled or defined by a module not included in the server configuration
  </code></pre>
  
  <p>The following are lines 6 through 9 of openssl.cnf ( I have not modified this file. )</p>
  
  <pre><code># This definition stops the following lines choking if HOME isn't
  # defined.
  HOME            = .
  RANDFILE        = $ENV::HOME/.rnd
  </code></pre>
  
  <p><strong>Any help is appreciated.
  Thanks !</strong></p>