[Zope-dev] Re: [Zope] Virtual hosting with ZServer
Michel Pelletier
michel@digicool.com
Tue, 09 Nov 1999 11:08:19 -0500
Martijn Pieters wrote:
>
> No, you'll run into trouble with Zope's need to have sites starting at it's
> root Folder. People are working on work-arounds for this. One way that
> seems to work for people is Evan Simpson's SiteAccess product:
>
> http://www.zope.org/Members/4am/SiteAccess
>
> It's release information will tell you how it can be used.
I just finished an alpha stab at virtual hosting, ala SiteAccess in
Zope. It apears to work well, and is much simpler than Evan's product,
since it was possible for us to modify ZPublisher ;).
Essentally, it consists of two new features in the infrastructure,
first, a 'setSite' method on the REQUEST object that resets all the URLx
and BASEx variables, and second we made 'absolute_url()' recursive, so
that terminating a URL path from object to root can be done by an
intervening SiteObject with not need to maintain lists of path elements
etc. that SiteAccess had to do.
Many of the idea of SiteObjects came from SiteAccess, Evan has written a
nifty product. Once caveat however, in order for Evan to do the things
he did, he has the dynamically patch methods in ZPublisher and the
REQUEST object. If you use the SiteAccess product, your Zope could
concivably break if you upgraded to a new version and we changed the
semantics of the methods that Evan patches.
In either case, 'official' virtual hosting, ala siteAccess, will be in
2.2.
-Michel