We also want to password protect our phpLDAPadmin location. Even though phpLDAPadmin has password authentication, this will provide an extra level of protection.
The utility that we need is contained in an Apache utility package. Get it by typing:
sudo apt-get install apache2-utils
Now that you have the utility available, you can create a password file that will contain a username that you choose and the associated hashed password.
We will keep this in the /etc/apache2 directory. Create the file and specify the username you want to use by typing:
sudo htpasswd -c /etc/apache2/htpasswd demo_user
Now, we are ready to modify Apache to take advantage of our security upgrades.