[Seaside-dev] Seaside 2.8 WAUrl>>takeParametersFromRequest: X-Forwarded-Host

Lukas Renggli renggli at gmail.com
Tue Mar 25 07:12:15 UTC 2008


> That can only be done at the VirtualHost or whole server level
>  unfortunately - so if you're hosting lots of different kinds of apps who
>  may or may not be expecting it, you can cause undue problems. I
>  attempted to convince our web master to do this unsuccessfully :)

I don't see the problem. I know many Seaside servers where there are
hunderts of application servers on hundreds of different domains.
seasidehosting.st is a good example. The Seaside web site is reachable
on seaside.seasidehosting.st and www.seaside.st.

We have to differentiate: the host name and port are automatically
detected from Apache, if properly setup. The (server) path is not
detected automatically, as there are no means do do that. Other
communities use naming conventions, Zope for example comes with the
Virtual Host Monster [1]. I don't really think that this is simple.

> >>  On a slightly different note - why do all the urls come with a
>  >>  hostname/port anyway? .. it's bad form to put out all this repeated
>  >>  information for every url.
>  >>
>  >
>  > Because redirects for example require a full URL.
>  >
>
> I think that translates in to "it was easier that way" .. in otherwords,
>  you don't need two different ways of getting the URL to work with.. one
>  for the anchors and one for the continuation redirects. That's
>  convenient for the framework, but really inconvenient for web masters
>  trying to use mod_rewrite or the like...

No, it is clearly the other way round. Image Seaside would use
different kinds of URLs and some of them wouldn't work, because the
"web master" forgot to configure some settings. He/she wouldn't
probably notice immediately and would be puzzled why it works in some
cases and in some others non-obvious ones (redirects, session expiry)
it doesn't. We have a very consistent situation right now: it works,
or it doesn't.

>  I'm not sure where the best middle ground there is honestly. Right now
>  we have to say 'suck it' to the web masters.

As many people know, I am a big fan of rewrite rules and I use them
excessively for more than 6 years. Essentially I do everything with
mod_rewrite, even if other people prefer specific solutions for that:
load balancing, virtual hosting, static file serving, response
caching, conditional serving, etc. The only limitation I encountered
in combination with Seaside is that there is no way to specify the
base-path the application should generate. I don't think that is your
problem, but it should be probably improved anyway.

Cheers,
Lukas

PS: Just to clarify. mod_rewrite does not involve reading and
rewriting the generated XHTML from Seaside, it is only about rewriting
the request URLs that hit the server. I noticed that some people
mis-understood that.

[1] http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/VirtualHosting.stx

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside-dev mailing list