How to configure secure LDAP authentication (LDAPS)?
Install ldap-utils, openssl and php-ldap (php4-ldap) packages.
Upload LDAP server public certificate (or certification authority public certificate ) (PEM file) to the
/etc/ssl/certs
directory.
Run the "
c_rehash
" command to create/update certificate hashes.
Edit LDAP configuration file (
/etc/ldap/ldap.conf
) and add the following option:
TLS_CACERTDIR /etc/ssl/certs
Note: Between TLS_CACERTDIR and directory must be a TAB character (don't use a space)!
Restart Apache web server.
Now, you can verify connection by using the command:
ldapsearch -x -H ldaps://ldap.mydomain.com
If it is success, you can use ldaps in your web authentication.