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

Possibility of Dynamic Virtual Hosting for svn

From: Deadpan110 <deadpan110_at_gmail.com>
Date: 2006-06-25 14:55:03 CEST

Hi,

After searching around on the internet to try and see if I can create
an apache virtual svn hosting service for every user on my network, 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.

ie.
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
http://httpd.apache.org/docs/2.0/vhosts/mass.html#simple

eg.
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 svn 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?

ie.
http://user-one.domain.com/svn/ = /home/user-one/svn/repos/
http://another-1.domain.com/svn/ = /home/another-1/svn/repos/
http://www.domain.com/svn/ = /home/www/svn/repos/

The Following example does not work and only 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
                </LimitExcept>
        </Location>

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.

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jun 25 14:56:12 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.