1

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 "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>

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 "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>

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

winhung
  • 553
  • 1
  • 5
  • 19
  • possible duplicate of [LDAP Authentication not enforced with certain URLs running websvn](http://stackoverflow.com/questions/14679349/ldap-authentication-not-enforced-with-certain-urls-running-websvn) – bahrep Mar 01 '13 at 13:33
  • Sigh, what was i doing...yes this is a duplicate. Any way to remove this question ? – winhung Mar 04 '13 at 05:08
  • is there any special reason to remove it? Just leave it be. – bahrep Mar 04 '13 at 09:09

1 Answers1

0

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.

Daniel Scott
  • 7,418
  • 5
  • 39
  • 58