Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have dav_svn installed to provide http access to my svn repos. The url is directly under root, eg This setup has been working great for some time. Now, I need SSI (server-side includes) for a project, so I enabled this module with a2enmod include. Now, tortoisesvn can't access the repo; it always returns a 301 permanent redirect. Some playing with it reveals I can access it in a browser if I'm sure to include the trailing / but it still doesn't work in TortoiseSVN. I've looked at all of the faq's for this problem with TortoiseSVN and apache, and none of them seem to apply to my problem. Anyone have any insight into this problem?

I'm running Ubuntu 9.10 with Apache 2.2.12. The only change I've made to my configuration is to enable the includes mod.

Here's my dav_svn conf:

<Location /svn>
    DAV svn
    SVNParentPath   /home/matthew/svn
    AuthType        Basic
    AuthName        "Subversion repository"
    AuthUserFile    /etc/subversion/passwd
    Require         valid-user

and here's the relevant part of my virtual host conf:

<Location /svn>
    SetHandler None
    Order allow,deny
    Allow from all

Edit: OK, I've discovered that the real conflict is between the include module and basic authentication. That is, if I disable the include module, browse to the subversion repo, enter my user/pass for the basic authentication, I can browse it just fine. It even continues to work after I re-enable the include module. However, if I browse with another browser where I'm not already authenticated, then it no longer works.

share|improve this question

I'm maybe missing something, but...

Where are physically located your repos? (it looks like you didn't fulfill the Location's requirement: "Use to apply directives to content that lives outside the filesystem" - or, from svn doc: "Be sure that when you define your new Location, it doesn't overlap with other exported locations.").

On my config, I also have the exported urls directly under root. I was then tented to use a single Location directive, like:

<Location />
  DAV svn
  SVNParentPath "path to repos - outside DocumentRoot, Alias,etc"
  SVNListParentPath on

Such config unfortunately didn't worked for both Tortoise access, Web browsing and other files to be served by the "normal" (non-svn) but caught by this directive.

So to solve this problem without asking the users to relocate their WC (and modifying all the docs), I simply added a directive for each repos:

<Location /sandbox>
     DAV svn
     SVNPath /var/lib/svn/sandbox

<Location /software>
    DAV svn
    SVNPath /var/lib/svn/software

<Location /stagingarea>
    DAV svn
    SVNPath /var/lib/svn/stagingarea


It's maybe not the same for you (apparently, you have the additional /svn level) but with so little details, it's hard to figure out the real cause. If possible, post some more details about your configuration (like the apache config).


share|improve this answer
The most important part (imo) is that all of this worked perfectly before I enabled the "include" mod. So it's really hard for me to see why my configuration could be at fault. However, I'll post some more details. – Matthew Talbert Feb 1 '10 at 18:54
btw, I tried your method, but it didn't work either. I'm starting to think it has something to do with AcceptPathInfo (include disables it) but so far my attempts to enable it have been futile. – Matthew Talbert Feb 1 '10 at 21:29
I honestly don't think that the modinclude is the real problem, but more a side effect - anyway, you may had better advise by posting on the subversion user list: (which is also available from gmane gmane.comp.version-control.subversion.user) – Flo Feb 2 '10 at 8:20
Anyway from your config I don't understant why you have two time the <Location /svn> directive; isn't that for silly reason the second one is used (which obviously isn't complete)? You can try to move the content of the dav_svn.conf (Location directive) to your virtual host - or for test purpose, simply add another Location with complete definition but different url: <Location /testsvn> DAV svn \ SVNParentPath /home/matthew/svn \ ... </Location> and browsing "" (\ stand for CR). BTW, no prob with debian lenny, apache2.2.9 and modinclude – Flo Feb 2 '10 at 8:33

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.