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

Re: Hosting multiple subdomains with a common SVNParentPath under apache

From: Ryan Schmidt <subversion-2011a_at_ryandesign.com>
Date: Thu, 10 Mar 2011 20:09:31 -0600

On Mar 10, 2011, at 15:17, Daniel F. Garcia wrote:

> This is a good solution, but I have 2 additional requirements
> * I have >100 subdomains and I want to save time setting them up (ok, I could script this)
> * I need to be able to add subdomains without restarting apache
>
> The 2nd requirement is why I used the *.mydomain.com alias and used the SVNParentPath directive.

Sorry, Daniel, I don't know a way to accomplish all those objectives. The only options Subversion provides are:

 * SVNPath: host a single repository at a URL
 * SVNParentPath: host multiple repositories under a parent URL

There is no provision for using SVNParentPath with the repository name coming from the hostname, only from a directory component in the URL.

You cannot use mod_rewrite or similar to fake this. Subversion clients do not follow HTTP redirects.

The only way I know to accomplish the functionality you want is to define each subdomain as its own VirtualHost, either manually or via a script you write. You will have to restart Apache when making changes, though a graceful restart shouldn't impact you too much.
Received on 2011-03-11 03:10:03 CET

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.