Home » Featured, Headline, Software Development

Apache 2 – Installing SSL certificates

15 October 2016 No Comment

Prerequisites

  • Have Apache2 installed.
  • Received CSR from Certificate Authority(CA), for more info refer to creating CSR

This post assumes the Operating System to be Linux (Ubuntu 14.04) distribution.

cd /etc/apache2/sites-available
cp 000-default.conf 000-default.conf.backup

// open to edit the conf file
sudo vi 000-default.conf

//add the following code
<VirtualHost *:443>
  ServerName nadzweb.com // if using subdomain, subdomain.nadzweb.com
  SSLEngine on
  SSLCertificateFile /home/nadzweb/nadzweb.com.crt // certificate file
  SSLCertificateKeyFile /home/nadzweb/nazweb.com.key // private key
  
  /**
   If you are using Apache 2.4.8 or greater, specify the CA intermediate bundle by adding this line **/
  SSLCACertificateFile /home/nadzweb/intermediate.crt // bundle file
/**
   If you are using Apache 2.4.7 or less, specify the CA intermediate bundle by adding this line **/
  SSLCertificateChainFile /home/nadzweb/intermediate.crt

 // apply other settings as required
</VirtualHost>

<VirtualHost *:80>
   ServerName nadzweb.com
   Redirect permanent / https://nadzweb.com/
</VirtualHost>

Once you have made the above changes, enable SSL on apache and restart the server.

sudo a2enmod ssl // enable SSL
sudo service apache2 restart // restart Apache2

You are all setup now.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image