git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git daemon directory munging?
@ 2006-06-04  0:13 Jon Loeliger
  2006-06-04  0:42 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Loeliger @ 2006-06-04  0:13 UTC (permalink / raw)
  To: git

Scrapped right off the #git IRC channel...


<jdl> I stumbled across some git-daemon quirk for which I'd like opinions on
      possible solutions.						[18:56]
<jdl> I run a server that houses multiple virtual hosts on one physical
      machine.
<jdl> It has multiple Apache based websites on it, and I want to front
      multiple git repositories with gitweb.  That all works fine.	[18:57]
<jdl> But when I set up my repository stores, ie the /pub/scm/repo.git places,
      it falls apart.
<jdl> I want to maintain separate sets of git repos for each virtual site.
									[18:58]
<jdl> That is, www.foo.com can't see the repos of www.bar.com and vice versa.
<jdl> So I have an Apache directory set up that maps www.foo.com/pub/scm to
      some place like /pub/foo/scm using an alias for /pub/scm.		[18:59]
<jdl> Similarly, for www.bar.com I map /pub/scm to /pub/bar/scm
<jdl> Now, when I clone using http: all is well as it correctly maps the URL
      using the Apache Alias entry.					[19:00]
<jdl> However, when cloning via git: it doesn't do the Alias mapping based on
      the given website prefix part of the URL.
<jdl> I would have to clone using git://www.foo.com/pub/foo/scm even though I
      would clone using http://www.foo.com/pub/scm/			[19:01]
<jdl> So my proposed solution is to setup a genarlization of the git-daemon
      -baser-path=path argument.
<jdl> Instead of a single --base-path, there are potentially multiple
      --base-path entries that match multiple a URL prefixes.		[19:02]
<jdl> Thus, I'd use something like:
      --map-base=www.foo.com/pub/scm:/pub/foo/scm
      --map-base=www.bar.com/pub/scm=/pub/bar/scm			[19:04]
<dormando> mod_rewrite for git :|
<jdl> Quick prefix hack, yeah.						[19:05]
<jdl> Um, stop me before I hack....? :-)				[19:06]
<dormando> you're going to end up needing something that supports basic
	   regexes before long
<dormando> I can't think of many cases where you'd want to directly map like
	   that, and especially in that specific manner.		[19:07]
<jdl> I can't hear you.
<dormando> sorry.
* dormando was going to have similar problems for his hosting service

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: git daemon directory munging?
@ 2006-06-05  2:10 Jon Loeliger
  2006-06-05  2:59 ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Loeliger @ 2006-06-05  2:10 UTC (permalink / raw)
  To: git


> Well, you can bind different git daemons to different IP addresses 
> (IP-based vhosting) or different ports (with SRV records in DNS.)

Is there existing support for telling the git-daemon what
specific IP to bind to out of an inetd setup and I just
missed it?

I could set that up realatively easily and gain the 
functionality I wanted that way too.

I've also hacked in a host interpolation too.

But like you said, canonicalizing it and checking it is likely
a bit of a pain.  I've side-stepped one angle of that by
symlinking in my /pub directory for multiple different
hostnames too.  :-)

jdl

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-06-05  2:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-04  0:13 git daemon directory munging? Jon Loeliger
2006-06-04  0:42 ` Linus Torvalds
2006-06-04  6:27   ` Junio C Hamano
2006-06-04 23:10     ` H. Peter Anvin
2006-06-04 23:08   ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2006-06-05  2:10 Jon Loeliger
2006-06-05  2:59 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).