Nginx SSL certificates expired

nginxssl

SSL certificate I've had configured for a website hosted in a an nginx server has been expired. I'm trying to renew it. (my CA is godaddy) And I followed (https://www.godaddy.com/help/renewing-your-ssl-certificate-864) to get the renewed files. Now I've two crt files (ffexxxxxxx.crt and gd_bundle-g2-g1.crt) Given below is my nginx conf file.

ssl_certificate ssl/bundle.crt;         
ssl_certificate_key ssl/websitename_private-key.pem;        
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:RSA+3DES:RC4:HIGH:!ADH:!AECDH:!MD5;

My Question is how can I generate a bundle.crt out of the new crt files that I've received when renewing (As I understand there is no need to generate private-key.pem again. Please correct me if I'm wrong)

P.S:- My certification authority is godaddy

Best Answer

There is nothing special about a bundle certificate, it is a plain text file with one public key after another, either use your favorite editor or concatenate the files:

 cat fexxxxxxx.crt gd_bundle-g2-g1.crt > bundle.crt

The result will be something like this:

-----BEGIN CERTIFICATE-----
AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXU
....
DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIEYDCCA0igAwIBAgILBAAAAAABL07hRQwwDQYJKoZIhvcNAQEFBQAwVzELMAkG
...
pOBWYdw9P91nbHZF2krqrhqkYE/Ho9aqp9nNgSvBZnWygI/1h01fwlr1kMbawb30
hag8IyrhFHvBN91i0ZJsumB9iOQct+R2UTjEqUdOqCsukNK1OFHrwZyKarXMsh3o
wFZUTKiL8IkyhtyTMr5NGvo1dbU=
-----END CERTIFICATE-----