git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: Add option to limit repositories to be shown by ServerName

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2012, 16:04 UTC
Message-ID
<7v628l8noh.fsf@alter.siamese.dyndns.org>
In-Reply-To
<d4f61bb06c9a125113442ae63be15ccea9464afd.1344932897.git.minovotn@redhat.com>
Michal Novotny <minovotn@redhat.com> writes:
Show 13 quoted lines
> this is the patch to limit repositories to be shown by the
> ServerName in the gitweb.cgi script. This is useful for cases
> you're hosting multiple websites on a single machine and you don't
> want all the repos to be shown in all of them.
> ...
> Use case scenario: Imagine you have one server running HTTPd
>                    for 3 domains, let's call them domain1,
>                    domain2 and domain3, and you want all of
>                    them to have a git server accessible via
>                    gitweb at these URLs:
>                    1) http://domain1/git
>                    2) http://domain2/git
>                    3) http://domain3/git

I do not run gitweb myself, but isn't the problem you are describing merely a symptom caused by your <VirtualHost /> sections that are not configured correctly, and instead having a single instance of gitweb cgi enabled for all the virtual hosts? Why does such a physical host want to have git repositories for different domains in a single place that is covered by a single instance of gitweb (hence a single $projectroot) in the first place? After all, domain1's notion of "kernel git repository" http://domain1/git/kernel.git might be totally different from that of domain2's, so wouldn't it be far more natural to have one $projectroot (hence one instance of gitweb) per such domains, configured in their own <VirtualHost /> sections?

Also, there may even be http://domain3/git that does not want to be served by gitweb but something else, e.g. cgit, on the same physical host, and in such a case, the approach taken by this patch still uses gitweb only to fail the request without letting cgit have its chance, no?

Previous: Michal NovotnyNext: J.H.
Message 2 of 3 in “gitweb: Add option to limit repositories to be shown by ServerName”
  1. gitweb: Add option to limit repositories to be shown by ServerNameMichal Novotny, Aug 14, 2012
  2. Junio C HamanoAug 14, 2012
  3. J.H.Aug 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.