This file is a bit more complex than the last one, so we will only discuss the changes that we have to make. All of the changes below should go within the Virtual Host block in the file.
First, set the ServerName value to your server's domain name or IP address again and change the ServerAdmin directive as well:
ServerAdmin webmaster@server_domain_or_IP
ServerName server_domain_or_IP
Next, we need to set the SSL certificate directives to point to the key and certificate that we created. The directives should already exist in your file, so just modify the files they point to:
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
The last thing we need to do is set up the location block that will implement our password protection for the entire phpLDAPadmin installation.
We do this by referencing the location where we are serving the phpLDAPadmin and setting up authentication using the file we generated. We will require anyone attempting to access this content to authenticate as a valid user:
<Location /superldap>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/htpasswd
Require valid-user
</Location>
Save and close the file when you are finished.
Restart Apache to implement all of the changes that we have made: