I am have been trying to setup an ssl certificate for a few days now, I am buying it from Namecheap.com and I am buying a rapid ssl wildcard certificate I am doing the following:
- Generate a csr -
openssl req -newkey rsa:2048 -nodes -keyout server.key -out server.csr
- I then wait to recieve an email to download the
.crt
file - Get the intermediate certificate and save it
intermediatecert.crt
- I then
cat intermediatecert.crt >> sslcertificate.crt
I then add the following lines to my nginx virtual host file
ssl_certificate /etc/ssl/sslcertificate.crt; ssl_certificate_key /etc/ssl/server.key;
I then restart my server and get the following error
[emerg]: SSL_CTX_use_PrivateKey_file("/etc/ssl/server.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
Does anyone have any ideas ?
FIXED
I fixed this by not reissuing it via namecheap and went straight to rapidssl to reissue and upload my csr.