<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">A
common desire is to set up a VirtualHost for SVN, with the DAV at the
root, so that URLs like <a class="moz-txt-link-rfc2396E"
 href="http://svn.example.com/reposname">"http://svn.example.com/reposname"</a>
work.  But there's one problem: If you do this using SVNParentPath, <b
 class="moz-txt-star"><span class="moz-txt-tag">*</span>and<span
 class="moz-txt-tag">*</span></b> you have ErrorDocuments globally
defined, you won't be able to add new files to the repository!  <br>
<br>
Reason: Committing a new file involves a PROPFIND for that file.  That
results in a 404 error.  That tries to load your ErrorDocument for
404.  That gets mapped to a file, say "/errors/404.html", and THAT is,
of course, within your "<Location />", so Apache passes it right
back to mod_dav_svn.  Result: "500 Cannot load the requested SVN
filesystem".   This seems to be the second most common cause of that
error on the users list (the first being permissions problems).
<br>
<br>
Luckily, Apache 2.0.51 and later have an "ErrorDocument xxx default"
override, which lets you unset ErrorDocument within a scope.  This
solves the problem. <br>
<br>
I think this should be documented in the section on Apache
configuration, because (a) it's a reasonably common problem, and (b)
understanding what causes it and how to fix it takes a lot of debugging
and/or Apache/SVN knowledge. 
<br>
<br>
Additionally, I've found that httpd requires the DocumentRoot directive
to be present and its path accessible, even though it's not otherwise
used with DAV.  I usually create an empty directory for this purpose. 
Without that, you'll get "403 Forbidden" on the OPTIONS request, even
if the svn repository itself is accessible.  Not sure if this is
actually a bug, but it's easy enough to work around.  <br>
<br>
So the minimal required configuration for a trouble-free root-based SVN
VirtualHost is httpd 2.0.51 or later, and:
<br>
<br>
<VirtualHost *:80>
<br>
   ServerName svn.example.com
<br>
<br>
   # This must be accessible, but is otherwise unused
<br>
   DocumentRoot "/srv/www/htdocs/empty-dir"
<br>
<br>
   <Location "/" >
<br>
       DAV svn
<br>
       SVNParentPath "<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>srv/svn<span
 class="moz-txt-tag">/</span></i>"
<br>
<br>
       ErrorDocument 404 default
<br>
   </Location>
<br>
</VirtualHost>
<br>
<br>
<br>
</div>
</body>
</html>