Branch links with serve-branches seem to be wrong when proxying

Asked by Andrew Watts

I installed loggerhead from the current lp revision (revno 269), and I'm running Debian testing with Paste 1.7.1, PasteDeploy 1.3.2, and Apache2 2.2.9-10+lenny2 with mod_proxy and mod_proxy_http. I'm using the loggerheadd init.d script to run serve-branches. After a bit of twiddling I have apache proxying to the loggerhead server. Sort of.

In loggerheadd I changed a couple of things for my local setup and preferences:

And added this to my apache configuration:
ProxyRequests off
    Order allow,deny
    Allow from all

<Location /bzr>
    Order allow,deny
    Allow from all

The links to the branches are wrong though; they're relative to / instead of /bzr. When I go to http://myservername:8080 everything works fine, but when I go to http://myservername/bzr/ and click on a branch name I get a 404. If I do a "bzr branch http://myservername/bzr/branchname" or go to http://myservername/bzr/branchname it does the right thing. It's just that the template isn't using the URL_PREFIX, I think.

Any clue how to fix this or suggestions about what I'm doing wrong? Thanks.

Question information

English Edit question
loggerhead Edit question
No assignee Edit question
Solved by:
Andrew Watts
Last query:
Last reply:
Revision history for this message
Michael Hudson-Doyle (mwhudson) said :

I think you should say:


(i.e. without the /bzr/ at the end).

Revision history for this message
Andrew Watts (andrew.watts) said :

If I don't put the /bzr at the end of the proxy pass line, then additionally the style sheets and images (anything under /static) don't load either.

Revision history for this message
Andrew Watts (andrew.watts) said :

Fascinatingly enough, it started working on its own with the setup I described above after I tried changing it to the suggested way (no go) and back. Something must not have taken until I restarted apache or loggerheadd the most recent time.

Revision history for this message
Michael Hudson-Doyle (mwhudson) said :

I was going to say, it works for me! Certainly, restarting apache a lot is part and parcel of debugging this sort of thing.

I hope loggerhead continues to work for you!