Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Generate Free SSL Certificate For Apache

In this quick and simple post I will show you how to generate a free SSL Certificate for use with Apache, this will allow your users to view your website/blog over a secure HTTPS connection instead of a standard insecure HTTP connection. For the purpose of this guide I will assume you are using Ubuntu server but if you need help getting it to work on a different OS then feel free to comment.

Lets start by installing all of the required packages. You will need to add the following repository:

sudo add-apt-repository ppa:certbot/certbot

Next you will need to update your packages list and install the actual packages:

sudo apt-get update && sudo apt-get install python-certbot-apache

After the required packages have been installed you will need to generate your certificate, this nifty tool will also walk you through the steps to enable your certificate. (Replace teachmelinux.com with your domain!)

sudo certbot --apache -d teachmelinux.com

When asked about redirecting traffic, it is up to you whether you want to force people to use HTTPS or still allow HTTP. I always pick to redirect as there is no reason to allow HTTP for my uses.

Once you have finished installing the certificates you can verify their existence by running the following command (again replace teachmelinux.com with your domain):

ls /etc/letsencrypt/live/teachmelinux.com/

The final step and it’s important not to forget, Setup Automatic Renewal. If you don’t setup automatic renewal then your certificate will expire in 60 days and users will receive certificate warnings when visiting your site. You can add a cronjob that accomplishes this by running the following:

echo "0 1 * * * /usr/bin/certbot renew --quiet" >> /etc/crontab

I hope you enjoyed this quick and to the point guide, please don’t forget to like/share/comment! =)



This post first appeared on Teach Me Linux, please read the originial post: here

Share the post

Generate Free SSL Certificate For Apache

×

Subscribe to Teach Me Linux

Get updates delivered right to your inbox!

Thank you for your subscription

×