0

Running Ubuntu 14.06, apache 2.4.7 and subversion 1.8.8

Here is my dav_svn.conf file

<Location /svn>
  DAV svn
  SVNPath /opt/svn/production/
  AuthType Basic
  AuthName "SvnTest"
  AuthBasicProvider ldap
  AuthLDAPBindDN "Account Here"
  AuthLDAPBindPassword "Password Here"
  AuthLDAPURL "LDAP server here"
  Require valid-user
</location>

When I go to http://localhost/svn, I get this

<D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns" xmlns:C="svn:">
   <C:error/>
   <m:human-readable errcode="2">Could not open the requested SVN filesystem</m:human-readable>
</D:error>

In the /var/log/apache2/error.log folder, I see the following entries

mod_dav_svn: nested Location '/svn' hinders access to '' in SVNPath Location '/svn'

(20014)Internal error: [client ipaddrhere] Can't open file 'a path here that isn't ANYWHERE/format': No such file or directory

On the /opt/svn/production/ folder I executed chown -R www-data:www-data *

The weird thing is when I change the location from /svn to /production, and go to http://localhost/production, it works. Normally I wouldn't care but the guy in charge of the project wants the url to be http://localhost/svn.

I'm pretty new when it comes to linux, coming from the microsoft land. So I'm sure I'm just missing something dead simple.

4
  • Where you have created the repo with svnadmin command?
    – ALex_hha
    Mar 22, 2016 at 21:52
  • I created it in a old directory at /usr/local/svn/repos/, and then moved it to the new location. Is that not allowed?
    – Calvin
    Mar 22, 2016 at 21:53
  • "and then moved it to the new location" which one?
    – ALex_hha
    Mar 22, 2016 at 21:57
  • I moved /usr/local/svn/repos/production to /opt/svn/production the production folder containing all the svn repo stuff (conf, db, format, hooks, locks, readme.txt)
    – Calvin
    Mar 22, 2016 at 22:03

1 Answer 1

0

Do you have only one repo on the server?

This type of error often cause the following settings

<Location /svn>
  ...
  SVNPath /opt/repos/svn
</Location>

<Location /svn/project1>
  ...
  SVNPath /opt/repos/project1
</Location>

So you should check all apache configs

I have been used the following template for last 5 years

<VirtualHost *:80>
   ServerName svn.example.net
   DocumentRoot /vhosts/svn.example.net/

   <Directory /vhosts/svn.example.net/>
      Options -Indexes
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>

   <Location />
      AuthBasicProvider ldap
      AuthType Basic
      AuthzLDAPAuthoritative on
      AuthName "Authorization required."
      AuthLDAPGroupAttribute memberUid
      AuthLDAPGroupAttributeIsDN off
      AuthLDAPBindDN uid=ldap_reader,ou=System,ou=users,dc=example,dc=com
      AuthLDAPBindPassword 1234567
      AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?sub
      Require ldap-group cn=svn,ou=groups,dc=example,dc=com
   </Location>

   <Location /repos/project1>
      DAV svn
      SVNReposName PROJECT1
      SVNPath /svn/repos/project1
      SVNIndexXSLT "/svnindex.xsl"
   </Location>

   <Location /repos/project2>
      DAV svn
      SVNReposName PROJECT2
      SVNPath /svn/repos/project2
      SVNIndexXSLT "/svnindex.xsl"
   </Location>
</VirtualHost>
2
  • I'm pretty sure it was the only repo. I'm just going to do it with a fresh install and see if I encounter the same problem. Starting to think maybe moving the repo around caused some issues...Thanks for the config though, I'll use it as a example!
    – Calvin
    Mar 23, 2016 at 13:51
  • 'Starting to think maybe moving the repo around caused some issues...' shouldn't be any problem with that.
    – ALex_hha
    Mar 23, 2016 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .