Apache webdav svn

From Noah.org
Revision as of 17:07, 19 October 2006 by Root (talk | contribs)
Jump to navigationJump to search

SVN+WebDAV on Apache2

This Howto describes how to mount subversion repositories on Linux via a WEBDAV server running on Apache2.

1. Build Apache2 with WEBDAV support. When running the ./configure script add these options: --enable-dav --enable-dav-fs

./configure --enable-dav --enable-dav-fs

2. Build subversion with Apache support. When running the ./configure script add the --with-apxs option. Be sure that Apache's apxs2 is in your PATH. This should be in the same bin directory as apachectl. Add the Apache2 bin directory to your PATH if it is not already there.

./configure --with-apxs

3. Add a subversion repository mapping to your httpd.conf. For example, if your subversion repository is in /home/svn you would add the following block to your httpd.conf:

# turn on webdav subversion with autoversioning (autocommit).
<Location /repos>
    DAV svn
    SVNParentPath /home/svn
    SVNAutoversioning on
</Location>

Don't forget to restart Apache.

4. Install davfs2 on Linux. Under Ubuntu or Debian simply run:

sudo apt-get install davfs2

5. Create a mount point for the WEBDAV filesystem.

sudo mkdir /media/webdav
sudo chmod a+rwx /media/webdav

6. Mount the WEBDAV filesystem:

sudo mount -t davfs http://www.example.com/repos/trunk/ /media/webdav