[Zope] Re: Using Pound

Robert Segall roseg@apsis.ch
Tue, 6 May 2003 01:51:50 +0200


On Monday 05 May 2003 23:57, you wrote:
> 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.)

You confuse between IP address and request host. The VHM (or any system like 
it) does not care in the least about what address a name resolves to - all 
they look at is what host was the request sent to.

As you read in earlier replies, all you need to do is to map (in VHM) between 
a host NAME and a Folder. If you use Pound to separate between hosts (which 
is not really necessary) you only need one mapping in the VHM, but you can 
have as many as you wish.

> 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?

No. Your current setup is fine.

> Presumably Zope does a
> gethostbyaddr() to find its domain.

That assumption is not really warranted...
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904