问题描述:

I working on a webpage and want to protect most of the page with a loginpage before entering the pages. I was thinking about directory access protection.

I have setup two test directory with the following settings in apache:

<Location /test>

# Using this to bind

AuthLDAPBindDN "##########"

AuthLDAPBindPassword "##########"

# search user

AuthLDAPURL "##########?sAMAccountName?sub? (objectClass=*)"

AuthType basic

AuthName "USE YOUR WINDOWS ACCOUNT"

AuthBasicProvider ldap

# Important, otherwise "(9)Bad file descriptor: Could not open password file: (null)"

AuthUserFile /dev/null

Require ldap-group ###########

#Require valid-user

</Location>

<Location /test2>

# Using this to bind

AuthLDAPBindDN "##########"

AuthLDAPBindPassword "###########"

# search user

AuthLDAPURL "ldap://##########?sAMAccountName?sub?(objectClass=*)"

AuthType form

AuthName "USE YOUR WINDOWS ACCOUNT"

AuthFormProvider ldap

AuthFormLoginRequiredLocation "../test_ldap.php"

# Important, otherwise "(9)Bad file descriptor: Could not open password file: (null)"

AuthUserFile /dev/null

Require ###################

#Require valid-user

</Location>

One has LDAP authentication, that one is working fine but gives an ugly Windows popup. I want to replace that to a form based page so I can customize the look and feel.

The other one is using formbased authentication. The redirect to the login form page is working fine but then im stuck. I have created a php page that validates to LDAP that is also working fine so that is my landing page but then still when I access my protected directory its not authenticated.

So I need a combination of both to get this working.

I have seen that the AuthFormProvider can be set to Ldap, and have done that but I don't get that to work.

I would be very gratefull if somebody could guide me in this project to the right direction.

相关阅读:
Top