Appendix D - Open LDAP Setup : Configure phpLDAPadmin
  

Configure phpLDAPadmin

Now that the package is installed, we need to configure a few things so that it can connect with the LDAP directory structure that was created during the OpenLDAP configuration stage.
Begin by opening the main configuration file with root privileges in your text editor:
sudo nano /etc/phpldapadmin/config.php
 
In this file, we need to add the configuration details that we set up for our LDAP server. Start by looking for the host parameter and setting it to your server's domain name or public IP address. This parameter should reflect the way you plan on accessing the web interface:
$servers->setValue('server','host','server_domain_name_or_IP');
 
Next, you will need to configure the domain name you selected for your LDAP server. Remember, in our example we selected test.com. We need to translate this into LDAP syntax by replacing each domain component (everything not a dot) into the value of a dc specification.
All this means is that instead of writing test.com, we will write something like:
dc=test,dc=com
 
We should find the parameter that sets the server base parameter and use the format we just discussed to reference the domain we decided on:
$servers->setValue('server','base',array('dc=test,dc=com'));
 
We need to adjust the same thing in our login bind_id parameter. The cn parameter is already set as admin. This is correct. We just need to adjust the dc portions again, as we did above:
$servers->setValue('login','bind_id','cn=admin,dc=test,dc=com');
 
The last thing that we need to adjust is a setting that controls the visibility of warning messages. By default, phpLDAPadmin will throw quite a few annoying warning messages in its web interface about the template files that have no impact on the functionality.
We can hide these by searching for the hide_template_warning parameter, uncommenting the line that contains it, and setting it to true:
$config->custom->appearance['hide_template_warning'] = true;
 
This is the last thing that we need to adjust. You can save and close the file when you are finished.