Hosting multiple subdomains with a common SVNParentPath under apache
I have an apache server that has an alias of *.mydomain.com. What I want is to setup svn paths that switch to different repositories according to the subdomain. E.g. http://subdomain1.mydomain.com/svn -> /var/svn/subdomain1 http://subdomain2.mydomain.com/svn -> /var/svn/subdomain2 http://subdomain2.mydomain.com/svn -> /var/svn/subdomain3 I setup a repository that used the SVNParentPath directive, then had a bunch of mod_rewrite rules to do all the mapping. I almost got it working. It worked in a web browser and repo browser but I could not do a checkout. Any ideas for a different approach? Has anyone done this successfully? Daniel F Garcia
RE: Hosting multiple subdomains with a common SVNParentPath under apache
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. Daniel. > I don't use SVNParentPath because I have a limited number of repositories and > don't add them on a regular basis. Instead I use VirtualHost directives: > > > ServerName subdomain1.mydomain.com > > DAV svn > SVNPath /var/svn/subdomain1 > ... > >... > > > Note that VirtualHost directives are incompatible with https: access because > the destination host name is encrypted with the rest of the packet data and > Apache can't decrypt the > packets before directing them. > > -- > David Chapman dcchap...@acm.org > Chapman Consulting -- San Jose, CA
RE: Hosting multiple subdomains with a common SVNParentPath under apache
> 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. My apache server runs other things, and I'm worried I'll lose php session state in the restart. I'll test it and see what happens. Last night I had a go at modifying mod_dav_svn to do what I want, but my changes weren't working very well. Google code use a similar structure. For example the yii code is under http://yii.googlecode.com/svn. If I had to guess I'd say they are probably using a layer 4-7 switch or something. Daniel.
Hosting multiple dynamic subdomains
I have an apache server that has an alias of *.mydomain.com. What I want is to setup svn paths that switch to different repositories according to the subdomain. E.g. http://subdomain1.mydomain.com/svn -> /var/svn/subdomain1 http://subdomain2.mydomain.com/svn -> /var/svn/subdomain2 http://subdomain2.mydomain.com/svn -> /var/svn/subdomain3 I setup a repository that used the SVNParentPath directive, then had a bunch of mod_rewrite rules to do all the mapping. I almost got it working. It worked in a web browser and repo browser but I could not do a checkout. Any ideas for a different approach? Has anyone done this? Daniel F Garcia
RE: Hosting multiple dynamic subdomains
Sorry, not sure why this posted twice. Please ignore. -Original Message- From: Daniel F. Garcia [mailto:dgar...@kobold.com.au] Sent: Friday, 11 March 2011 6:36 AM To: users@subversion.apache.org Subject: Hosting multiple dynamic subdomains I have an apache server that has an alias of *.mydomain.com. What I want is to setup svn paths that switch to different repositories according to the subdomain. E.g. http://subdomain1.mydomain.com/svn -> /var/svn/subdomain1 http://subdomain2.mydomain.com/svn -> /var/svn/subdomain2 http://subdomain2.mydomain.com/svn -> /var/svn/subdomain3 I setup a repository that used the SVNParentPath directive, then had a bunch of mod_rewrite rules to do all the mapping. I almost got it working. It worked in a web browser and repo browser but I could not do a checkout. Any ideas for a different approach? Has anyone done this? Daniel F Garcia