Install SSL for Apache2 on Ubuntu

After earlier post on Certificate Signing Request (CSR) Generation. Continue on install the SSL cert. My example here follows the steps of installing SSL from Verisign.

So, after submission of subdomain.domainname.com.csr to Verisign. An email received from Verisign, the email included the public cert, and on the web site link is the intermediate CA cert. Besides, because I’m using the trial version, so another Root CA cert need to be manually installed.

To test on my browser, my browser need to install the Root CA cert
The procedure is here ssl-certificates-support – so10668

Here to get the Intermediate Cert to install on Apache server. trial-secure-server-intermediate

On the Apache2 server,

$a2enmod ssl

Then, move the Certs to the Apache2 folder. It is easier to manage.

 
$sudo mkdir /etc/apache2/ssl/
$sudo cp ~/subdomain.domainname.com.public.crt /etc/apache2/ssl/
$sudo cp ~/subdomain.domainname.com.intermediate.crt /etc/apache2/ssl/
$sudo cp ~/subdomain.domainname.com.key /etc/apache2/ssl/

Create a site conf file for SSL site. Here an example of copy from file default to ssl and create symbolic link for it.

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl

Modify /etc/apache2/sites-available/ssl

NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/subdomain.domainname.com.public.crt
SSLCertificateKeyFile /etc/apache2/ssl/subdomain.domainname.com.intermediate.key  
SSLCertificateChainFile /etc/apache2/ssl/subdomain.domainname.com.intermediate.crt

Finally, give Apache a restart

$sudo /etc/init.d/apache2 restart
Advertisements