I would like to perform Basic authentication using LDAP on Apache 2.4.18, but I received the following description file from my colleague.
username:test.dev
password:test
trees:LDAP-DEV
Hostname: dev.auth-ldap.co.jp
port number: 636 (or 389)
Followed by this file to modify Apache2 configuration file (/etc/apache2/sites-available/000-default.conf):
...
<Directory/usr/lib/cgi-bin>
AuthType Basic
AuthName "ID/Password"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPURL ldap://dev.auth-ldap.co.jp:389
AuthLDAPBindDN "test.dev"
AuthLDAPBindPassword "test"
require valid-user
...
</Directory>
...
However, LDAP doesn't work at all, and the cgi-bin / bottom that can be connected is no longer connected.
apache ubuntu ldap
You need information about the attributes that contain the BaseDN and username.
I think LDAP-DEV in Tree is part of BaseDN, so please check it out.
The AuthLDAPURL directive has the following format:(Reference: Manual)
AuthLDAPURL ldap://host:port/basedn?attribute?scope?filter
For example, if the BaseDN is "dc=LDAP-DEV,dc=local" and the username attribute is "uid", set it as follows:
AuthLDAPURLldap://dev.auth-ldap.co.jp:389/dc=LDAP-DEV,dc=local?uid
If you want to filter with objectClass or other attributes, set it as follows:
AuthLDAPURLldap://dev.auth-ldap.co.jp:389/dc=LDAP-DEV,dc=local?uid?sub?(objectClass=inetOrgPerson)
© 2024 OneMinuteCode. All rights reserved.