I've been blocking my site for HTTPS for 2 days now (VPS Server, Node.js, Nginx, Unbuntu).
I ordered a certificate from an organization, so I received 4 certificates.
From what I understood, I had to create a .key and .csr (which include my personal data) with this command:
openssl req -new -newkey rsa:2048 -nodes -keyout domainname_com.key -out domainname_com.csr
After that I had to bring together the 4 certificates in 1 alone (Because otherwise it does not work if I understood correctly), so that's what I did while respecting this order:
cat domainname.crt intermediate1.crt intermediate2.crt root.crt > ssl-bundle.crt
Once the file was created (I checked the file by opening a text editor and everything is ok), I configured my default file (/ etc / nginx / site-available / default): that's ok.
And here is the problem, when I run I got an error: [emerg] SSL_CTX_use_PrivateKey_file ("/ etc / ssl / private / example.key") failed (SSL: error: 0B080074: x509 certificate rout ...
After long research on the net, I saw that my keys did not correspond a priori, but I do not understand well how to solve this problem.
Thank you for your possible feedback, David