title: Installed self-signed SSL certificates, Apache won't start
body: <p>I'm trying to build a website which requires the Stripe payment gateway, and therefore requires SSL. I'm using XAMPP on Windows 10. After generating SSL certificate and key pair and installing in Apache, Apache no longer starts.</p>
  
  <p>I'm attaching a few error messages and configs. Please help.</p>
  
  <p>This is message in Apache error log. It no longer reproduces these error messages. So something must've changed. I think I tried generating the certificate and key via a different method. But Apache still won't start.</p>
  
  <pre><code>[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] AH02577: Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file C:/xampp/apache/conf/ssl.key/server.key)
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] AH02311: Fatal error initialising mod_ssl, exiting. See C:/xampp/apache/logs/error.log for more information
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] AH02564: Failed to configure encrypted (?) private key www.loc1.dev:443:0, check C:/xampp/apache/conf/ssl.key/server.key
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=RSA)
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
  [Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
  AH00016: Configuration Failed
  </code></pre>
  
  <p>This is the error I get when trying to start Apache from command line.</p>
  
  <pre><code>Apache 2 is starting ...
  AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:26
  (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : AH00072: make_sock: could not bind to address [::]:443
  (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : AH00072: make_sock: could not bind to address 0.0.0.0:443
  AH00451: no listening sockets available, shutting down
  AH00015: Unable to open logs
  </code></pre>
  
  <p>Here is the error that was posted in XAMPP Control Dialog.</p>
  
  <pre><code>1:16:13 PM  [Apache]    Error: Apache shutdown unexpectedly.
  1:16:13 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
  1:16:13 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
  1:16:13 PM  [Apache]    Press the Logs button to view error logs and check
  1:16:13 PM  [Apache]    the Windows Event Viewer for more clues
  1:16:13 PM  [Apache]    If you need more help, copy and post this
  1:16:13 PM  [Apache]    entire log window on the forums
  </code></pre>
  
  <p>This is what is in httpd-vhosts.conf. I'm trying to setup SSL for loc1.dev.</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
    DocumentRoot "C:/xampp/htdocs/loc.com/public_html"
    ServerName loc.dev
    ServerAlias www.loc.dev
    &lt;Directory "C:/xampp/htdocs/loc.com/public_html"&gt;
    AllowOverride All
    Require all Granted
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
    DocumentRoot "C:/xampp/htdocs/loc1.com/public_html"
    ServerName loc1.dev
    ServerAlias www.loc1.dev
    &lt;Directory "C:/xampp/htdocs/loc1.com/public_html"&gt;
    AllowOverride All
    Require all Granted
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
    DocumentRoot "C:/xampp/htdocs/foodharbor.org/public_html"
    ServerName foodharbor.dev
    ServerAlias www.foodharbor.dev
    &lt;Directory "C:/xampp/htdocs/foodharbor.org/public_html"&gt;
    AllowOverride All
    Require all Granted
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>This is what I have in httpd-ssl.conf</p>
  
  <pre><code>&lt;VirtualHost _default_:443&gt;
  
  #   General setup for the virtual host
  DocumentRoot "C:/xampp/htdocs/loc1.com/public_html"
  ServerName www.loc1.dev
  ServerAdmin jonathan.najman@gmail.com
  ErrorLog "C:/xampp/apache/logs/error.log"
  TransferLog "C:/xampp/apache/logs/access.log"
  SSLEngine on
  SSLCertificateFile "conf/ssl.crt/server.crt"
  SSLCertificateKeyFile "conf/ssl.key/server.key"
  
  &lt;/VirtualHost&gt;     
  </code></pre>
  
  <p>This is what is in my hosts file (C:\Windows\System32\drivers\etc\hosts).</p>
  
  <pre><code>127.0.0.1   localhost
  127.0.0.1   loc.dev
  127.0.0.1   loc1.dev
  127.0.0.1   foodharbor.dev
  </code></pre>
  
  <p>Am I missing anything?</p>