Relative URLs behind Apache2 proxy possible?

Asked by moadin

Hi together,

I start serve-branches with "--prefix=/bzr" behind Apache2 proxy. Apache2 is also configured correctly and redirects /bzr to the paste httpserver. On the first webpage everything is shown correct and images are also loaded.

Now, the links are no more correct in html source:
Instead of
http://subdomain.domain.com/bzr/
all the dynamic links go to http://www.subdomain.domain.com:8080/bzr/
So they are dead! Static links are relative and still correct in source (/bzr/static/...)

Is it possible to make dynamic links also relative?
Where to configure it? There is no more configuration file in serve-branches.

Maybe there's another answer for this problem?

Thanks for help.
Moadin

Question information

Language:
English Edit question
Status:
Solved
For:
loggerhead Edit question
Assignee:
No assignee Edit question
Solved by:
moadin
Solved:
Last query:
Last reply:
Revision history for this message
moadin (moadin) said :
#1

I found a dirty workaround: In loggerhead/apps/branch.py I changed code before return value of "url" method to:
if (len(qs) > 0):
    qs = "?" + qs
return "http://subdomain.domain.com" + self._url_base + "/".join(args) + qs

So now the links are working.
But hopefully it will also be fixed from Loggerhead-team in future releases of loggerhead?

Moadin

Revision history for this message
Mikko Värri (vmj) said :
#2

I did basically the same thing: http://bazaar.launchpad.net/~vmj/loggerhead/linuxbox.fi/revision/225

I'm not sure whether the domain name part is needed, so I dropped it.