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 have an issue with my Apache config, specifically how it interacts with the SVN DAV mod.

What I want to be able to do is have point at my website, to point at my svn directory (which is currently outside of my public_html directory) and for both to be accessible via https.

I've got it working for the most part, but if I set up an explicit VirtualHost for the svn subdomain, it stops the svn application from being able to access the repositories (instead just getting a "repository moved permanently" error), I can browse the repos ok.

my config looks something like:

<VirtualHost *:443>
    DocumentRoot /path/to/website/dir
    #stuff for SSL cert etc.

<VirtualHost *:80>
    DocumentRoot /path/to/website/dir

<Location /repo>
    DAV svn
    SVNPath /path/to/repos
    ... #auth details

This works mostly, but browsing to brings up my website, and browsing to brings up the repository ( works fine, also works fine), potentially I'd maybe want to display a set of webpages all about my project, docs etc, would ideally point to either nothing, or a list of the repositories available or a separate page or something. I thought I'd got the hang of apache config files, but this one is stumping me!

share|improve this question
up vote 2 down vote accepted

You should have a separate <VirtualHost> directive for your and / domains. It looks like you're trying to squeeze both in to the first <VirtualHost>. After you have them separated, put the SVN directives inside the host.

share|improve this answer
I tried this at first but when has its own virtual host, running the svn command on remote boxes fails, complaining that it has "moved permanently" and can't interact with the repository at all. Browsing the repository via a web browser works fine though! The error I get is svn: Repository moved permanently to ''; please relocate – MalphasWats Jan 15 '10 at 18:46
Got it! I had another go at splitting it out, this time leaving out the DocumentRoot directive from the svn virtualhost, figuring that I don't actually want apache trying to serve any documents, SVN needs to do it. Everything works as I want, with the single exception that I can't get to display a webpage, I just get Forbidden, displays the repos fine, give me the 404 error I expect. Thank you – MalphasWats Jan 15 '10 at 19:17
That's probably because the checkout you have still points to the old http:// address. You need to use svn switch --relocate on your working copy to update the address. – Kamil Kisiel Jan 15 '10 at 19:18
I had been getting the error even when doing an svn info, I have the repos accessible via both http and https at the moment – MalphasWats Jan 15 '10 at 19:22

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.