Using Subversion with Apache Virtual Hosts

Posted on Saturday, August 28, 2004 in Uncategorized

I’ve been using Subversion for a while through SSH. Whilst upgrading my home server to Fedora Core 2 I decided to try implementing it through Apache WebDAV.

This is already well documented, but I wanted to be awkward – I wanted to host my repository behind a virtual host, and documentation for this is lacking so…

Simply add the following to your httpd.conf – I’m assuming you already know how to set up virtual hosts.

 <VirtualHost *:80>
     DocumentRoot /path/to/subversion/repositories
     ServerName svn.example.com
     ServerAlias svn

     <Location />
         DAV svn
         SVNParentPath /path/to/subversion/repositories
     </Location>
 </VirtualHost>

This configuration will allow you to host multiple repositories located in /path/to/subversion/repositories under the virtual host svn.example.com – now you just need to figure out your permissions!

I thoroughly recommend the book “Version Control with Subversion” which is available in both dead tree and online formats.

Related posts:

Hosting Rails applications with mongrel , Apache 2 & mod_proxy on Debian Stable About ten months ago I switched from Apache 2 to... Useful subversion bash functions Inspired by bbum’s Useful subversion shell aliases I decided to... My name in print …and this time I’ve got the cover all to myself!... Deployment requires consideration complains that deploying a Rails application is a sticking point... Hard Copy Got back from swimming this morning to find a package...

Related posts brought to you by Yet Another Related Posts Plugin.

I fail to recognize why the
ServerAlias svn
line is necessary


Mobilized by Mowser Mowser
Mobilytics