micalexander
12/6/2016 - 2:43 AM

Install CA SSL on Ubuntu and Apache Server

Install CA SSL on Ubuntu and Apache Server

CA SSL on an Ubuntu server running Apache

Step 1

Generate the key and csr file on the server

$ openssl req -new -newkey rsa:2048 -nodes -sha256 -days 365 -keyout domain.com.key -out domain.com.csr

Step 2

Go the the ssl issuer site and paste in the generated code found in the .csr file into the designated section. The code will look something like this.

-----BEGIN CERTIFICATE REQUEST-----
blah ...
-----END CERTIFICATE REQUEST-----

Step 3

Download the .crt files from the ssl issuer. In Godaddy's case that look something like this:

randomcharacters.crt
gd_bundle-g2-g1.crt

Step 4

Head back over to Apache and find you httpd.conf or httpd-vhosts.conf and look for the line below for the domain that you are installing the ssl for

SSLCertificateFile
SSLCertificateKeyFile 
SSLCACertificateFile

and change it to look like the code below

SSLCertificateFile /path/to/randomcharacters.crt
SSLCertificateKeyFile /path/to/domain.com.key
SSLCACertificateFile /path/to/gd_bundle-g2-g1.crt

Step 5

Save the file and test the config file to make sure there are no errors.

$ apachectl -t

Step 6

Reboot the server

$ sudo reboot