How to do it...

We will now see how to create a self-signed certificate using OpenSSL for Apache. This will help encrypt traffic to the server:

  1. We start with installing the OpenSSL package on the first system using the following command:

  1. Once OpenSSL is installed, we need to enable SSL support, which comes as standard in the Apache package for Ubuntu. To do this, we run this command:

After enabling SSL support, restart Apache using this command:

    service apache2 restart
  1. Now, create a directory inside Apache's configuration directory. This ...

Get Practical Linux Security Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.