2014-10-10 62 views
0

我有一个使用<Directory>的LDAP身份验证,但现在我需要与<Location>相同的身份。使用LDAP的Apache2身份验证

工作:

<Directory /home/foo-bar/> 
    DAV on 
    AuthType Basic 
    AuthName "foo bar" 
    AuthBasicProvider ldap 
    AuthLDAPUrl ldap://www.foo.bar 
    AuthLDAPBindDN cn=admin,dc=bar 
    AuthLDAPBindPassword foo 
    AuthLDAPGroupAttribute memberUid 
    AuthLDAPGroupAttributeIsDN off 
    Require valid-user 
</Directory> 

什么都不做:

<Location /foo-bar/> 
    DAV on 
    AuthType Basic 
    AuthName "foo bar" 
    AuthBasicProvider ldap 
    AuthLDAPUrl ldap://www.foo.bar 
    AuthLDAPBindDN cn=admin,dc=bar 
    AuthLDAPBindPassword foo 
    AuthLDAPGroupAttribute memberUid 
    AuthLDAPGroupAttributeIsDN off 
    Require valid-user 
</Location> 

当我测试它与只允许IP地址1.2.3.4奥德当我尝试的passwd文件位置的工作,但当我尝试ldap验证时,没有任何事情发生(=浏览器显示页面)。

回答

0

这工作:

<Location /railo-context/> 
    AuthBasicProvider ldap 
    AuthType Basic 
    AuthName "Railo Admin" 
    AuthLDAPURL ldap://www...... 
    AuthLDAPBindDN cn=admin,dc=.... 
    AuthLDAPBindPassword ..... 
    Require ldap-user ..... 
</Location>