SVN over HTTP
Mar.29, 2010 in
Think Linux, Think Software, Think Technology
Objective
I want to be able to browse the svn dir from a website like http://zeus.dev/svn.php and at the same time, be able to checkout from the repository via http://zeus.dev/svn/projectname
How
First of all, install mod_dav_svn
Then in the apache config, I am using vhost for example
<VirtualHost *:80>
DocumentRoot /home/data/zeus.dev/apps/
ServerName zeus.dev
# this is for svn
<Location /svn.php>
RewriteEngine on
RewriteRule svn.php/([^/\.]+) /svn/$1 [L]
</Location>
<Location /svn>
DAV svn
# SVNPath /home/data/svn/
SVNParentPath /home/data/svn
# Limit write permission to list of valid users.
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "SVN repository"
AuthUserFile /etc/httpd/conf.d/subversion.passwd
Require valid-user
</Location>
</VirtualHost>
In my document root, /home/data/zeus.dev/apps, I have a svn.php file soft-linked to /home/data/svn (the place where all svn repository are). As you can see from above, I also use a basic authentication mechanism for anyone who wishes to checkout from the repo.

Leave a Reply