I am tying to use GoDaddy ssl with Nginx. I am having and issue getting this to work. Any help would be appreciated.
I did the following:
openssl req -new -newkey rsa:2048 -nodes -keyout img.example.com.key -out img.example.com.csr
Gave this to GoDaddy and requested a new cert.
Next I combined the two crt files into one.
Assuming your certificate file is called example.com.crt, use this command to create a combined file called example.com.chained.crt (replace the highlighted part with your own domain):
cat example.com.crt intermediate.crt > example.com.chained.crt
server_name example.com;
ssl_certificate /home/sammy/example.com.chained.crt;
ssl_certificate_key /home/sammy/example.com.key;
I am now seeing this error when I try to start Nginx:
sudo nginx -t
nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/nginx/ssl-certs/img.example.com.key") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: ANY PRIVATE KEY error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)
Anyone know why I am getting this error?
Thanks Phil
Had the same issue. Changing the encoding from UTF-8
to ANSI
did work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With