【问题标题】:LDAP auth not working with websvnLDAP 身份验证不适用于 websvn
【发布时间】:2013-02-28 07:01:31
【问题描述】:

我的设置如下: 带有 SVN 1.5.6 和 WebSVN 2.3.3 的 Win7(32 位)桌面上的 Apache 2.2.21。

当我使用 websvn.conf 文件中的这些设置浏览到我的 websvn 页面时,LDAP 身份验证不会启动,

Alias /websvn/ "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/websvn/"

<Directory /websvn/>
Options FollowSymLinks
CheckCaseOnly on

#Redirect any requests to this page to the page u want
FallbackResource  listing.php

Order allow,deny
Allow from all

<IfModule mod_php4.c>
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
</IfModule>

#Valid NIE account to access nie ldap. Recommended to have only read-only rights
AuthLDAPBindDN "user001@somewhere.com"
AuthLDAPBindPassword "password"

#The LDAP query URL
AuthLDAPURL "ldap://xxx:389/DC=x,DC=x,DC=x,DC=x,DC=x?sAMAccountName?sub?(objectClass=user)" NONE

AuthType Basic
AuthName "Websvn DIR"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off  

Require ldap-user user
</Directory>

但是,如果将 websvn.conf 文件更改为此,LDAP 身份验证就会启动,

<Location /websvn/> 
Options FollowSymLinks
CheckCaseOnly on

FallbackResource listing.php

Order allow,deny
Allow from all

<IfModule mod_php4.c>
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
</IfModule>


AuthLDAPBindDN "user001@somewhere.com"
AuthLDAPBindPassword "password"

#The LDAP query URL
AuthLDAPURL "ldap://xxx:389/DC=x,DC=x,DC=x,DC=x,DC=x?sAMAccountName?sub?(objectClass=user)" NONE

AuthType Basic
AuthName "Websvn Loc"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off  

Require ldap-user user
</Location>

所以,我的问题是为什么会发生这种情况?为什么 LDAP auth 只在 websvn 配置文件使用时才生效,而不是?

【问题讨论】:

标签: apache ldap websvn


【解决方案1】:

Directory 指令必须与文件系统上的目录的完整路径相匹配:

http://httpd.apache.org/docs/2.2/mod/core.html#directory

因此,由于您的 C: 驱动器的根目录中没有 /websvn 目录,因此该指令不匹配且未配置 LDAP 身份验证。

【讨论】:

  • 您需要更多帮助吗?如果我的回答解决了您的问题,请接受。
猜你喜欢
  • 2017-10-10
  • 2013-12-19
  • 2020-09-08
  • 2016-05-03
  • 2016-08-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-04
相关资源
最近更新 更多