[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Apache + SVN (+ LDAP) don't works

From: Saulo Soares de Toledo <saulotoledo_at_gmail.com>
Date: Mon, 10 May 2010 17:14:53 -0300

Some more news! I changed a little and the error changed. I removed the
"DocumentRoot" from configuration too.

The new error is:
[Mon May 10 17:12:10 2010] [error] [client 192.168.254.241] client denied by
server configuration: /etc/apache2/htdocs

But /etc/apache2/htdocs does not exists, and I put "<Directory *>" and
"Allow from all" above. What is going wrong now?
And I'm not certainly if the another error will not happen....

<VirtualHost *:8012>

    ServerAdmin me_at_me.com
    ServerName subversion.myserver

    ErrorLog /var/log/apache2/subversion.myserver-error_log
    CustomLog /var/log/apache2/subversion.myserver-access_log combined

    LogLevel debug

    <Location />
        DAV svn

        SVNParentPath /home/files/svn_root
        SVNListParentPath on

        # Enable WebDAV automatic versioning
        SVNAutoversioning On

        # Repository Display Name
        SVNReposName "Subversion Repository"

        AuthType Basic
        AuthName "(Subversion)"

        AuthLDAPURL ldap://localhost/ou=Users,dc=my,dc=server,dc=net?uid
        AuthLDAPBindDN cn=admin,dc=my,dc=server,dc=net
        AuthLDAPBindPassword myPassword

        AuthBasicProvider ldap
        AuthUserFile /dev/null

        Require valid-user
    </Location>

    <Directory "/home/files/svn_root">
        Order allow,deny
        Allow from all
    </Directory>

    <Directory *>
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>

2010/5/10 Saulo Soares de Toledo <saulotoledo_at_gmail.com>

> Hello all!
>
> I've tried this at IRC rooms without results, then I'm here to try the
> list! :)
>
> I'm trying enable Apache + LDAP + SVN to enable my SVN server service. All
> almost done, but with this config at Apache (I have this VH only to
> subversion!):
>
>
> 1. <VirtualHost *:8012>
> 2.
> 3. ServerAdmin me_at_me.com
> 4. ServerName subversion.myserver
> 5.
> 6. DocumentRoot /var/www/
> 7.
> 8. ErrorLog /var/log/apache2/subversion.myserver-error_log
> 9. CustomLog /var/log/apache2/subversion.myserver-access_log
> combined
> 10.
> 11.
> 12. <Location /svn>
> 13. DAV svn
> 14.
> 15. SVNParentPath /home/files/svn_root
> 16. SVNListParentPath on
> 17.
> 18. ## Enable WebDAV automatic versioning
> 19. SVNAutoversioning On
> 20.
> 21. ## Repository Display Name
> 22. SVNReposName "Subversion Repository"
> 23.
> 24. AuthType Basic
> 25. AuthName "(Subversion)"
> 26.
> 27. AuthLDAPURL
> ldap://localhost/ou=Users,dc=my,dc=server,dc=net?uid
> 28. AuthLDAPBindDN cn=admin,dc=my,dc=server,dc=net
> 29. AuthLDAPBindPassword myPassword
> 30.
> 31. AuthBasicProvider ldap
> 32. AuthUserFile /dev/null
> 33.
> 34. Require valid-user
> 35.
> 36. </Location>
> 37.
> 38. <Directory "/home/files/svn_root">
> 39. Order allow,deny
> 40. Allow from all
> 41. </Directory>
> 42.
> 43. </VirtualHost>
>
>
>
> <http://pastebin.com/e6cg1Yt2>When I connect from a SVN client I receive
> the error "*Repository moved permanently to 'http:...'; please relocate*".
>
> The best info I found is here:
> http://subversion.apache.org/faq.html#http-301-error . With the content:
>
> *"It means your httpd.conf is misconfigured. Usually this error happens
> when you've defined the Subversion virtual "location" to exist within two
> different scopes at the same time.*
>
> *For example, if you've exported a repository as <Location /www/foo>, but
> you've also set your DocumentRoot to be /www, then you're in trouble. When
> the request comes in for /www/foo/bar, apache doesn't know whether to find
> a **real file named /foo/bar within your DocumentRoot, or whether to ask
> mod_dav_svn to fetch a file /bar from the /www/foo repository. Usually the
> former case wins, and hence the "Moved Permanently" error.*
>
> *The solution is to make sure your repository <Location> does not overlap
> or live within any areas already exported as normal web shares.*
>
> *It's also possible that you have an object in the web root which has the
> same name as your repository URL. For example, imagine your web server's
> document root is /var/www and your Subversion repository is located at
> /home/svn/repo. You then configure Apache to serve the repository at
> http://localhost/myrepo. If you then create the directory /var/www/myrepo/this will cause a 301 error to occur."
> *
>
>
> But what's wrong with my config? I don't understood what is happening.
> My Apache logs have this (debug mode actived):
>
> [Fri May 07 18:14:19 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:14:19 2010] [error] [client 192.168.254.241] (2)No such file
> or directory: Requests for a collection must have a trailing slash on the
> URI. [301, #0]
> [Fri May 07 18:22:28 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:22:28 2010] [error] [client 192.168.254.241] Requests for a
> collection must have a trailing slash on the URI. [301, #0]
> [Fri May 07 18:22:28 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:22:28 2010] [error] [client 192.168.254.241] (2)No such file
> or directory: Requests for a collection must have a trailing slash on the
> URI. [301, #0]
> [Fri May 07 18:26:14 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:26:14 2010] [error] [client 192.168.254.241] Requests for a
> collection must have a trailing slash on the URI. [301, #0]
> [Fri May 07 18:26:14 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:26:14 2010] [error] [client 192.168.254.241] (2)No such file
> or directory: Requests for a collection must have a trailing slash on the
> URI. [301, #0]
> [Fri May 07 18:34:15 2010] [debug] mod_deflate.c(615): [client
> 192.168.254.241] Zlib: Compressed 484 to 328 : URL /svn
> [Fri May 07 18:34:19 2010] [debug] mod_authnz_ldap.c(379): [client
> 192.168.254.241] [26599] auth_ldap authenticate: using URL
> ldap://localhost/ou=Users,dc=my,dc=server,dc=net?uid
> [Fri May 07 18:34:19 2010] [debug] mod_authnz_ldap.c(484): [client
> 192.168.254.241] [26599] auth_ldap authenticate: accepting saulo
> [Fri May 07 18:34:19 2010] [debug] mod_authnz_ldap.c(556): [client
> 192.168.254.241] [26599] auth_ldap authorise: declining to authorise (no
> ldap requirements)
> [Fri May 07 18:34:19 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:34:19 2010] [error] [client 192.168.254.241] Requests for a
> collection must have a trailing slash on the URI. [301, #0]
> [Fri May 07 18:34:19 2010] [debug] mod_deflate.c(615): [client
> 192.168.254.241] Zlib: Compressed 323 to 232 : URL /svn
> [Fri May 07 18:34:19 2010] [debug] mod_deflate.c(615): [client
> 192.168.254.241] Zlib: Compressed 484 to 328 : URL /svn
> [Fri May 07 18:34:19 2010] [debug] mod_authnz_ldap.c(379): [client
> 192.168.254.241] [26600] auth_ldap authenticate: using URL
> ldap://localhost/ou=Users,dc=my,dc=server,dc=net?uid
> [Fri May 07 18:34:19 2010] [debug] mod_authnz_ldap.c(484): [client
> 192.168.254.241] [26600] auth_ldap authenticate: accepting saulo
> [Fri May 07 18:34:19 2010] [debug] mod_authnz_ldap.c(556): [client
> 192.168.254.241] [26600] auth_ldap authorise: declining to authorise (no
> ldap requirements)
> [Fri May 07 18:34:19 2010] [error] [client 192.168.254.241] Could not fetch
> resource information. [301, #0]
> [Fri May 07 18:34:19 2010] [error] [client 192.168.254.241] (2)No such file
> or directory: Requests for a collection must have a trailing slash on the
> URI. [301, #0]
> [Fri May 07 18:34:19 2010] [debug] mod_deflate.c(615): [client
> 192.168.254.241] Zlib: Compressed 323 to 232 : URL /svn
>
>
> Waiting your responses, thanks. :)
>
>
> Saulo
>
>
>
Received on 2010-05-10 22:15:23 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.