Apache – How to Fix Startup Failure with New SSL Certificate

apache-2.2httpdredhatssl-certificate

I'm running RHEL 6.4 and my trusted certificate has expired recently, so I decided to renew it. I've obtained a new certificate from StartSSL.
After downloading and putting the certificate file on the server, I specified the new certificate in httpd.d/ssl.conf.

/sbin/service httpd configtest

says Syntax OK,
but

/sbin/service httpd restart

causes [FAILED] result with no error message. Where can I find the actual reason?

UPDATE:

[error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
[warn] RSA server certificate CommonName (CN) `www.mywebsite.com' does NOT match server name!?

these lines were found in error_log of particular viruatal host.

(www.mywebsite.com is substitution of real domain for conspiracy reason of course)

Best Answer

x509 certificate routines:X509_check_private_key:key values mismatch means that the private key you have specified does not match the public key in the certificate you have specified.

Make sure that you are referencing the correct key and certificate files in your configuration.

RSA server certificate CommonName (CN) 'www.mywebsite.com' does NOT match server name!? may be a sign that it is the wrong certificate that has been specified.