Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

It gives me error: Repository moved permanently to ''; please relocate

But if I do:

svn info

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 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 And be able to checkout?

Apache file looks like this:

<VirtualHost *:80>

   Redirect permanent /


<VirtualHost *:443>


   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.

share|improve this question
up vote 0 down vote accepted

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
</Directory> 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.

share|improve this answer
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 – Sandro Dzneladze 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? :) – Sandro Dzneladze 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 posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.