Quickly Enable SSL for Apache Web Server on Linux or Raspberry Pi: A Step-by-Step Guide
This post describe how to quickly enable SSL for apache web server under linux or a Raspberry PI.
1- The first step is to create a directory where we will store the encryption certificates:
sudo mkdir /etc/apache2/ssl
2- We will now generate the certicates, for 3 years (1095 days):
sudo openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key
This will generate the following output:
4- We will edit the default Apache site (sudo nano /etc/apache2/sites–enabled/000–default–ssl.conf) and add the following lines: