TLS/SSL Certificate Installation for Apache on Ubuntu Server

Configure Apache With TLS/SSL Certificate on Ubuntu Server

Generate Certificate

Create a directory place to store the file

Generate a CSR and private key using following command

Complete the process with it using the relevant information

Now move the certificate into the same folder you created using the following commands

Apache virtual host configuration

Navigate to the default Apache site config directory using the following command

This config file tells the server where to find SSL certificate. It should look like this:

Edit this: ServerAdmin webmaster@localhost to this :

ServerAdmin admin@gp.local

Add this right below the ServerAdmin line:


Now, edit these lines with our certificate location:

SSLCertificateFile    /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key

The new file should look like this:

Save the file, and close it.

Enable the SSL module using following command

Enable the site we have just edited:

Restart Apache:

The website is now secure, access it using following address in the browser



Please follow and like us: