Configure Apache to Support SSL
Creating the SSL Certificate
sudo a2enmod ssl
sudo service apache2 restart
Generate a Self-signed Certificate
sudo openssl genrsa -out ca.key 2048
sudo openssl req -nodes -new -key ca.key -out ca.csr
Lastly, generate a self-signed certificate (ca.crt) of X509 type valid for 365 keys.
sudo openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
Create a directory to place the certificate files we have created.
sudo mkdir /etc/apache2/ssl