On Mon, 5 May 2003, Paul Winkler wrote: virtual host monster On Mon, 5 May 2003, Maik Jablonski wrote:
What magic does one use to convince Zope to use the appropriate domain name when it generates an absolute URL?
To set up several virtual hosts with Pound read:
For Zope: Set up a VirtualHostMonster (=> Mappings) in each Zope which maps the server-name to a folder, from which the site is served:
Thanks Maik and Paul, but I am still confused. I have a number of independent Zope instances, call them zope0, zope1, zope2 all residing on the same machine, each front-ended with pound. Incoming requests are distributed by pound, based on the domain name alpha.mydomain.com beta.mydomain.com gamma.mydomain.com to zope0, zope1, and zope2, respectivelys. The DNS maps all of these domains onto the same IP address. Zope0, zope1, and zope2 are mapped to independent (IP-address, port) pairs by pound. In my non-working test case, they go to 127.0.0.1:8080, :9080: 7080. Now, an instance of zope, for example, zope1, needs to construct an absolute URL. The incoming request has been remapped by pound and appears to have originated at 127.0.0.1:9080 but the absolute URL that's needed is http://beta.mydomain.com/.... I don't see how the virtual host monster makes this play. (I do see how it could be used to do virtual hosting at each individual instance of Zope, but that's not what I want to do.) Would I be better off were I to bind the zope instances to local addresses, say 10.0.0.1, 10.0.0.2, and 10.0.0.3 and make suitably adjust named to return the qualified domain names? Presumably Zope does a gethostbyaddr() to find its domain.