LDAP auth not working with websvn

1.3k Views Asked by At

My setup are as follows : Apache 2.2.21 on a Win7 (32-Bit) Desktop with SVN 1.5.6 and WebSVN 2.3.3.

LDAP Auth does not kick in when i browse to my websvn page with these settings in the websvn.conf file,

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 "[email protected]"
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>

However, LDAP auth kicks in if the websvn.conf file was change to this,

<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 "[email protected]"
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>

So, my question is why does this happen ? Why does LDAP auth only kicks in when the websvn configuration file is using and not ?

1

There are 1 best solutions below

1
On

The Directory directive has to match the full path od a directory on your filesystem:

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

So, because you don't have a /websvn directory in the root of your C: drive, the directive doesn't match and doesn't configure the LDAP authentication.