我的设置如下:使用SVN1.5.6和WebSVN 2.3.3的Win7 (32位)桌面上的Apache2.2.21。
当我在websvn.conf文件中使用这些设置浏览到我的websvn页面时,LDAP Auth不起作用
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文件更改为以下内容,
<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身份验证只在websvn配置文件正在使用而不是在使用时生效?
发布于 2013-04-09 05:33:32
Directory指令必须与文件系统上目录的完整路径相匹配:
http://httpd.apache.org/docs/2.2/mod/core.html#directory
因此,因为在C:驱动器的根目录中没有/websvn目录,所以该指令不匹配,并且没有配置LDAP身份验证。
https://stackoverflow.com/questions/15129450
复制相似问题