How to – Create and setup Self-Signed SSL – Apache – Ubuntu 14.04

Why should you use SSL ? The primary reason for you to use SSL if you want  to send sensitive data across the Internet and you want it to be encrypted. Any computer in between you and the server can see your credit card numbers, user names and passwords, and other sensitive information if it is not encrypted with an SSL certificate. When you enable the SSL so the connection is secure, all the information and data will  be unreadable by others. But just remember there is nothing in this world there is completely secure.

I am using ubuntu 14.04 LTS server with Apache for this.


Step 1.  Enable SSL module in Apache

apache have SSL support as a standard so the first thing we want to do is to  activate the SSL  module

To make Apache recognize the changes we need to restart the service


Step 2. Create the Self-Signed Certificate

We need to create a subdirectory in /etc/apache where we are gonna place our SSL certificate files

Now that we have made our folder for the SSL certificate we are going to create the ssl key and certificate.

when you hit enter you wil have to fill in the information you are asked about. The most important is the common name, there should be your domain ow ip-addres.



Step 3. We have made our certificate and our key so it is time to tell  Apache should use these two files.

the file you are gonna see should look somthing like this. you should instert ServerName and change the path for the certificate and the key



Step 3. Activate our SSL Virtual host

To activate our SSL virtual host we should do a

And to load or new host we should restart Apache

if this is a outgoing server you should remember to portforward port 443.


Step 5. Is to test our SSL

We should head into the browser and type Https://type you local ip  or you domain.
You will see a warning because  our SSL certificate is not verified.  This is normal as it is a self signed certificate and we just want our connection to be encrypted. So go a head and press proceed so you can go to you site with an https:// instead of http://


SSL Warning