Created
August 15, 2010 01:02
-
-
Save mgrouchy/524908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#first generate a key for your domain | |
openssl genrsa -out yourdomain.com.key 2048 | |
#then generate the request | |
openssl req -new -key yourdomain.com.key -out yourdomain.com.csr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if you want to remove the password from your certificate so its | |
#not required on webserver restart(optional) | |
mv yourdomain.com.key yourdomain.com.passkey | |
sudo openssl rsa -in yourdomain.com.passkey -out yourdomain.com.key | |
#if on nginx prepare your certificate by combining the two files given to | |
#you by godaddy | |
cat yourdomain.com.crt gd_bundle.crt > yourdomain.com_combined.crt | |
#your nginx config for your server on port 443 will contain | |
ssl on; | |
ssl_certificate /ssl_location/yourdomain.com_combined.crt; | |
ssl_certificate_key /ssl_location/yourdomain.com.key; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if you are on apache your apache config should look like this | |
#unlike nginx apache allows you to specify a Certificate chain | |
#file so you don't have to combine your certificates to make them | |
#appear correctly in all browsers. | |
SSLEngine On | |
SSLCertificateFile /ssl_location/yourdomain.com.crt | |
SSLCertificateKeyFile /ssl_location/yourdomain.com.key | |
SSLCertificateChainFile /ssl_location/gd_bundle.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test