[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Dynamic Virtual Hosting for svn

From: Deadpan110 <deadpan110_at_gmail.com>
Date: 2006-06-24 11:35:13 CEST


After searching around on the internet for a solution, I thought I would
share what I am trying to do with everyone on the subversion mailing list.

Firstly, my apache webservers are configured for Dynamic Virtual Hosting so
a user has their website within their home directory and apache figures it
out according to parts of the domain name.

http://user-one.domain.com/ = /home/user-one/public_html/
http://another-1.domain.com/ = /home/another-1/public_html/
http://www.domain.com/ = /home/www/public_html/

This is enabled with the mod_vhost_alias module outlined at

VirtualDocumentRoot /home/%1/public_html
VirtualScriptAlias /home/%1/cgi-bin

Using %1 gets the 1st part of the domain name.

After setting up and successfully using svn with apache, I realised that
http:// [any name] .domain.com/svn/ only allowed me to set up a single
location on my servers for the SVNPath (or even SVNParentPath) but ideally,
I would like to know if its possible or indeed have functionality for
dynamically virtual hosting svn repositries as per user?

The Following example does not work but intends to show what I mean.

       <Location /svn>
               DAV svn
               SVNPath /home/%1/svn/repos
               AuthType Basic
               AuthName "Subversion repository"
               AuthUserFile /home/%1/svn/conf/svnusers
               <LimitExcept GET PROPFIND OPTIONS REPORT>
                   Require valid-user

And produces the following apache error which shows the %1 has not been
replaced with the 1st part of the domain name:
apache: [Sat Jun 24 10:20:06 2006] [error] [client *.*.*.*] (20014)Error
string not specified yet: Can't open file '/home/%1/svn/repos/format': No
such file or directory

Although, it is not a life or death situation, this functionality could
allow users on my servers to have and maintain their very own svn
repositries available from http:// [their name] .domain.com/svn/

If there are other ways to do this within my current apache setup, then I
would be interested to hear about them.

Received on Sat Jun 24 21:50:52 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.