[Seaside] seaside with mod proxy: mapping urls to applications
Colin Putney
seaside@lists.squeakfoundation.org
Sun, 1 Dec 2002 20:07:09 -0800
On Sunday, December 1, 2002, at 11:07 AM, Avi Bryant wrote:
>
>
> On Sat, 30 Nov 2002, Colin Putney wrote:
>
>> I haven't been able to solve this problem either. (Though I'm using
>> Seaside 1). At some point we'll need to teach seaside to distinguish
>> between the urls through which it is reached, and the urls it
>> generates
>> in the HTML. That will give us a lot more flexibility to integrate
>> Seaside into more complex systems for load-balancing, proxying etc.
>
> Colin - what would this require? A configuration option for the urls
> that
> an application generates, rather than it simply using what it's given
> as a
> base url? That should be trivial to add, but I'm confused as to why
> it's
> necessary - is mod_proxy only supposed to be used when the remote site
> knows it's being proxied?
No, mod_proxy is supposed to work transparently. The issue is that
we're using it for *reverse* proxying. It makes an apache server map
part of its url space onto the url space of another server. That works
fine as long as all the links on pages that get served through the
proxy are relative.
The problem is that Seaside produces urls with an absolute path
component. Because of this, mod_proxy can only be set up to map url
spaces in such a way that the path exposed to the browser is the same
as the one used by seaside. So Derek's example of mapping /calendar/ to
/seaside/sandcaster/ won't work.
So there are a couple ways to solve this. One is to (as you suggest
above) add a configuration option so we can specify the path prefix to
use for generated urls. Another would be to make the generated urls
completely relative. (But that might involve lots of ../../ type stuff,
depending on the url scheme.)
Colin