How to convert godaddy certification files from .cert to .pem
Recently days, I met an issue to renew ssl certification file for a website. The former developer setup certification file to .pem. It take a long time to make it work. Here we go.
Convert .crt to .pem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# convert .key file to key.pemopenssl rsa -in mywebsite.com.key -text > key.pem
# convert .cert to cert.pemcat mywebsite.com.crt > cert.pem
# add cert chain to the cert.pemcat mywebsite.com.ca-bundle >> cert.pem
# clone pemcp cert.pem staging.pem
#openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096tar -cxvf tar -jcvf mywebsite.com-v3.tar.bz2 *.pem
Upload mywebsite.com-v3.tar.bz2 to server and renew ssl certification
1
2
3
4
5
6
7
8
9
tar -jxvf mywebsite.com-v3.tar.bz2
mv all the pem file to /home/mywebsitepath
# Testing nginx configurationdocker exec -it nginx nginx -t
# Restart nginx instancedocker restart nginx