我的设置如下: 带有SVN 1.5.6和WebSVN 2.3.3的Win7(32位)桌面上的Apache 2.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文件更改为
,则LDAP auth将启动<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配置文件时才启动?
答案 0 :(得分:0)
Directory指令必须匹配文件系统上目录的完整路径:
http://httpd.apache.org/docs/2.2/mod/core.html#directory
因此,因为您的C:驱动器的根目录中没有/ websvn目录,所以该指令不匹配,并且不配置LDAP身份验证。