I've read all other topics that "seemed" similar on stackoveflow and I couldn't find solution.

When I issue command in local network svn co ip/svn/repo All works fine.

But sometimes I do checkout on remote servers so I need domain set-up with dyndns. I've setup apache long time ago to support this, but have never seen this error before.

So if I do:

svn info https://svn.idev.ge/gamoicanies/

It gives me error: Repository moved permanently to 'https://svn.idev.ge/gamoicanies/'; please relocate

But if I do:

svn info https://svn.idev.ge/gamoicanies/logo

It works just fine.

So my problem is that I cannot checkout root of repository. But I can do fine with sub directories.

Directory structure for my repo is such:


My subdomain svn.idev.ge goes directly to /svn/ dir. And I presume this is the root of all my troubles. Any ideas how to fix my apache config to maintain subdomain without adding extra useless svn dir like https://svn.idev.ge/svn/gamoicanies/ And be able to checkout?

Apache file looks like this:

<VirtualHost *:80>

   ServerName svn.idev.ge
   ServerAlias www.svn.idev.ge
   Redirect permanent / https://svn.idev.ge/


<VirtualHost *:443>

  ServerAdmin sandrodz@gmail.com
  ServerName svn.idev.ge
  ServerAlias www.svn.idev.ge

   DocumentRoot /var/svn/

       SSLEngine On
       SSLCertificateFile    /etc/apache2/ssl/server.crt
       SSLCertificateKeyFile /etc/apache2/ssl/server.key

   <Directory />
    Order allow,deny
    allow from all

    <Location />
      DAV svn
      SVNParentPath /var/svn/
      SVNListParentPath On
      AuthType Basic
      AuthName "Subversion Repository"
      AuthUserFile /etc/apache2/passwords
      Require valid-user
      AuthzSVNAccessFile /var/svn/svnusers.conf


Please this is very frustrating.


You're not using that DocumentRoot for anything, just change it to something else that's not a parent of the SVN directory, or remove it altogether and let the server's default (probably /var/www/ or /var/www/html) be used instead. The directory overlap is the cause of the problem.

By the way, this block:

<Directory />
  Order allow,deny
  allow from all

..is probably not what you want to do; putting an allow on the filesystem root is never necessary and potentially a serious security problem.

Put your Order and Allow directives within the <Location /> block instead.

  • Can you please give me example of how you would rewrite my apache file? I'm new to server administration, and frankly I don't understand much... Would not it be equal security risk to put allow directive under location? I thought directory was the location :S – user113400 Apr 17 '13 at 13:08
  • @SandroDzneladze Just two changes to what you have there. 1) Remove the DocumentRoot /var/svn/ line. 2) Remove <Directory /> and move the stuff inside it to inside <Location /> - directory is actually the filesystem, so you're setting the service to allow access to everything on the entire server. – Shane Madden Apr 17 '13 at 20:29
  • 1 more question, I'm running apache with www-data user, this user doesn't have ability to write to filesystem other than specific files and folders. Even if I give apache write access to filesystem it won't be, because of user it is running under, correct? or am I completely out of the concept here? :) – user113400 Apr 18 '13 at 6:54
  • @SandroDzneladze Right - the Order and Allow directives are controlling what resources a user can request; that doesn't have any bearing on where the processes running under the www-data user can read/write data on the filesystem. For that, you'll just want to give the user the access to do what it needs to do; for mod_dav_svn to operate correctly for instance, you should chown -R www-data:www-data /var/svn/. – Shane Madden Apr 18 '13 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy