title: SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
body: <p>I'm not able to setup SSL. I've Googled and I found a few solutions but none of them worked for me. I need some help please...</p>
  
  <p>Here's the error I get when I attempt to restart nginx:</p>
  
  <pre><code>root@s17925268:~# service nginx restart
  Restarting nginx: nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/nginx/conf.d/ssl/ssl.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
  nginx: configuration file /etc/nginx/nginx.conf test failed
  </code></pre>
  
  <p>My certificate is from StartSSL and is valid for 1 year.</p>
  
  <p>Here's what I tested:</p>
  
  <ul>
  <li>The certificate and private key has no trailing spaces.</li>
  <li>I'm not using the default server.key file.</li>
  <li>I checked the nginx.conf and the
  directives are pointing to the correct private key and certificate.</li>
  </ul>
  
  <p>I also checked the modulus, and I get a different modulus for both key and certificate.</p>
  
  <p>Thank you for your help. :)</p>