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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.