能否请您告诉我如何在LDAP身份验证中使用FORM而不是apache给出的默认登录弹出窗口。
以下是apache配置,当我访问网页时获得登录页面,但是在提供用户名,密码后,我没有被重定向到所请求的页面,而是再次出现登录页面(我检查了ldap凭据在默认页面,它可以正常工作,因此ldap没问题)
<Location />
# SetHandler form-login-handler
AuthName example
AuthFormProvider ldap
AuthType form
AuthFormLoginRequiredLocation http://localhost/login.html
AuthBasicProvider ldap
AuthLDAPURL ldap://localhost/dc=linuxbabe,dc=com?uid?sub?(objectClass=*)
# Require ldap-filter objectClass=posixAccount
Require valid-user
</Location>
<Location "/login.html">
Order allow,Deny
Allow from all
require all granted
</Location>
<Location /dologin.html>
SetHandler form-login-handler
AuthType form
AuthName example
AuthFormProvider ldap
AuthFormLoginRequiredLocation http://localhost/login.html
</Location>
<html>
<head><title>Test Login</title></head>
<body>
<form method="POST" action="/dologin.html">
Username: <input type="text" name="httpd_username" value="" />
Password: <input type="password" name="httpd_password" value="" />
<input type="submit" name="login" value="Login" />
<input type="hidden" name="httpd_location"
value="http://localhost/index.html" />
</form>
</body>
</html>