Using loggerhead with the same URL as an bzr+http repository

Lionel Dricot zeploum at gmail.com
Wed Dec 10 10:52:23 GMT 2008


That was exactly my conclusion. Then, after 3 hours of trying, I gave up (I
might not be skilled enough in mod_rewrite. This is always very painful for
me).

Then, this morning, I had an alternative idea : redirect only what is useful
to loggerhead to another directory called bzr2 and this one will proxy
loggerhead.

My solution :


Options Indexes FollowSymLinks
RewriteEngine On

#Bzr smart-server
RewriteBase /bzr
RewriteRule ^(.*/|)\.bzr/smart$ /bzr/bzr-smart.py [L]

#Redirect the main page to loggerhead
RewriteRule ^bzr/$ /bzr2/ [L]
#redirect each project to loggergead
RewriteRule ^bzr/([0-9a-zA-Z_\-]*)/$ /bzr2/adev/$1 [L]
# Loggerhead proxies.
RewriteRule ^bzr2/(.*)$ http://localhost:8080/$1 [L,P]


It seems to work fine. The only drawback is that url in loggerhead are not
pretty : they use bzr2// (yes, with double slash). But it's functionnal.

On Tue, Dec 9, 2008 at 5:50 PM, Matt Nordhoff <mnordhoff at mattnordhoff.com>wrote:

> Lionel Dricot wrote:
> > Hello,
> >
> > I'm using my bzr+http repository in a subfolder of my server. (
> > http://server/bzr/ ) Unfortunatly, I cannot add a virtualhost (this is
> > on an intranet and I don't have the right to add a subdomain).
> > The branches are physically located in /server/www/bzr/ as subfolder.
> > I also have loggerdhead running on http://server:8080/
> >
> > I want to have loggerhead available on http://server/bzr/
> >
> > I'm a bit lost with mod_proxy and I want to keep the
> > branching/push/pulling on the same address than the loggerhead interface
> > (to not confuse my users)
> >
> > How can I do that ? Is there anybody with a similar setup ?
> >
> > I thought that http://live.gnome.org/DistributedSCM/BazaarPlayground
> > would help but it happens that nothing work for me on this page.
> >
> > Thanks in advance,
> >
> > Lionel
>
> Actually, the config sample on that page does show how to do it: You
> need to configure your web server like this:
>
> * Send requests ending with "/.bzr/smart" to the smart server.
> * All other requests containing "/.bzr/" or ending with "/.bzr" should
> be handled like any other static file.
> * Send all other requests to Loggerhead.
>
> How you configure that is another matter. That gnome page shows how for
> Apache; anyway, it should be a pretty simple matter.
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20081210/99e69278/attachment.htm 


More information about the bazaar mailing list