Difference between revisions of "Apache webdav svn"

From Noah.org
Jump to navigationJump to search
 
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
 
[[Category:SVN]]
 
[[Category:SVN]]
 +
 +
'''I hate WebDAV. I eventually decided it was more trouble than it was worth...'''
 +
 
== SVN+WebDAV on Apache2 ==
 
== SVN+WebDAV on Apache2 ==
 
I hate WebDAV. I eventually decided it was more trouble than it was worth...
 
  
 
This Howto describes how to mount subversion repositories on Linux via a WEBDAV server running 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
 
1. Build Apache2 with WEBDAV support. When running the ./configure script add these options: --enable-dav --enable-dav-fs
 +
 
<pre>
 
<pre>
 
./configure --enable-dav --enable-dav-fs
 
./configure --enable-dav --enable-dav-fs
Line 16: Line 18:
 
bin directory as apachectl. Add the Apache2 bin directory to your
 
bin directory as apachectl. Add the Apache2 bin directory to your
 
PATH if it is not already there.
 
PATH if it is not already there.
 +
 
<pre>
 
<pre>
 
./configure --with-apxs
 
./configure --with-apxs
Line 23: Line 26:
 
For example, if your subversion repository is in /home/svn you would add
 
For example, if your subversion repository is in /home/svn you would add
 
the following block to your httpd.conf:
 
the following block to your httpd.conf:
 +
 
<pre>
 
<pre>
 
# turn on webdav subversion with autoversioning (autocommit).
 
# turn on webdav subversion with autoversioning (autocommit).
Line 31: Line 35:
 
</Location>
 
</Location>
 
</pre>
 
</pre>
 +
 
Don't forget to restart Apache.
 
Don't forget to restart Apache.
  
 
4. Install davfs2 on Linux. Under Ubuntu or Debian simply run:
 
4. Install davfs2 on Linux. Under Ubuntu or Debian simply run:
 +
 
<pre>
 
<pre>
 
sudo apt-get install davfs2
 
sudo apt-get install davfs2
Line 39: Line 45:
  
 
5. Create a mount point for the WEBDAV filesystem.
 
5. Create a mount point for the WEBDAV filesystem.
 +
 
<pre>
 
<pre>
 
sudo mkdir /media/webdav
 
sudo mkdir /media/webdav
Line 45: Line 52:
  
 
6. Mount the WEBDAV filesystem:
 
6. Mount the WEBDAV filesystem:
 +
 
<pre>
 
<pre>
 
sudo mount -t davfs http://www.example.com/repos/trunk/ /media/webdav
 
sudo mount -t davfs http://www.example.com/repos/trunk/ /media/webdav
 
</pre>
 
</pre>

Latest revision as of 09:15, 20 August 2008


I hate WebDAV. I eventually decided it was more trouble than it was worth...

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