Error loading rsa private key - MUP for deploying Meteor app to Digital Ocean w / SSL
I have a Meteor application that I am deploying to a Digital Ocean Ubuntu server via MUP . It works fine without SSL, but I can't figure out the SSL part.
I bought Comodo SSL Cert. They sent me 4 .crt files. I can run the following command:
cat cert1.crt cert2.crt cert3.crt mydomain.crt > ssl.pem
Then I put this file ssl.pem
in my root directory locally. Added "ssl": {"pem":"./ssl.pem"}
to my mup.json
file and running mup setup
- everything will succeed as long as:
[45.55.225.190] x Verifying SSL Configurations (ssl.pem): FAILED
-----------------------------------STDERR-----------------------------------
Trying to initialize SSL contexts with your certificatesError loading rsa private key
-----------------------------------STDOUT-----------------------------------
----------------------------------------------------------------------------
I'm not even sure how to fix this issue. I ran swift find
on the server and ssl.pem
- there, so mup sent the file successfully, but it stud
doesn't seem to check the file or find it?
source to share
It turns out I ran into two different problems. First, you have your certificate files in a very specific order. Secondly, I have not included my key file. The command to create the .pem file is needed:
cat mydomain.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt mydomain.nopass.key > ssl.pem
This blog post on DeveloperSide.NET helped me a lot.
source to share