In this tutorial we go over how to enable HTTPS on Apache HTTP Server, HTTPS is used to encrypt traffic to and from the server.
This is a very common practice now with also every site having HTTPS turned on. As this helps to keep your websites secure. Linux server that is accessible from the internet. I’m using Amazon Linux via Amazons new service called Lightsail
You only need a Linux server that is accessible from the internet with apache installed. I’m using Amazon Linux via Amazon new service called Lightsail.
I will be using a self-signed certificate as this the easiest way to get started. But to go live with HTTPS on your website you will need a certificate signed by a certificate authority such as GoDaddy.
Let’s get started!
First, we will need to install an Apache module called mod_ssl, there are different packages depending on your version of Apache HTTP server for 2.2 you can run:
yum install mod_ssl
For Apache HTTP server 2.4 you need to install:
yum install mod24_ssl
Next, we need to restart the httpd service by running:
service httpd restart
Once the service has restarted we should be able to browse to the server by going to
Once this module is installed we should see a new file in
This is where we make additional config changes to the SSL set up such a changing which cyphers the server uses if you need the site to be very secure. What versions of SSL and TLS you are willing to support as its recommended that we do not use some of the default but I leave that choice to you.
AWS Certified Solutions Architect with more than 7 years experience in IT as an IT Support Technician/Devops Engineer.
4 of them years working with AWS.
Specialising in AWS and Linux Infrastucture