The first thing we should do is enable the SSL module in Apache. We can do this by typing:
sudo a2enmod ssl
This will enable the module, allowing us to use it. We still need to configure Apache to take advantage of this, though.
Currently, Apache is reading a file called 000-default.conf for regular, unencrypted HTTP connections. We need to tell it to redirect requests for our phpLDAPadmin interface to our HTTPS interface so that the connection is encrypted.
When we redirect traffic to use our SSL certificates, we will also implement the password file to authenticate users. While we are modifying things, we will also change the location of the phpLDAPadmin interface itself to minimize targeted attacks.