Pound (current version) looks like the right choice for our particular application. I planning out the system I have stumbled on a couple of problems where I need some help.B I have Pound working. I encountered one minor problem--the code claims the configuration director is found in /usr/local/etc/pound.cfg whereas some of the documentation suggests it is to be found in /usr/local/etc/pound/pound.cfg Pound maps an incoming request to a (IP address, Port) based upon the host name. In my particular case, I want to run multiple instances of Zope (say, 127.0.0.1:8080 and 127.0.0.1:9080) remapped from, say, alpha.mydomain.com and beta.mydomain.com. What magic does one use to convince Zope to use the appropriate domain name when it generates an absolute URL?
On Mon, May 05, 2003 at 01:33:29PM -0700, Dennis Allison wrote:
What magic does one use to convince Zope to use the appropriate domain name when it generates an absolute URL?
VirtualHostMonster. -- Paul Winkler home: http://www.slinkp.com "Muppet Labs, where the future is made - today!"
Dennis Allison wrote:
I have Pound working. I encountered one minor problem--the code claims the configuration director is found in
/usr/local/etc/pound.cfg
whereas some of the documentation suggests it is to be found in
/usr/local/etc/pound/pound.cfg
Hi Dennis, You can determine the configuration file with an option: /usr/local/sbin/pound -f /etc/pound/pound.cfg
Pound maps an incoming request to a (IP address, Port) based upon the host name. In my particular case, I want to run multiple instances of Zope (say, 127.0.0.1:8080 and 127.0.0.1:9080) remapped from, say, alpha.mydomain.com and beta.mydomain.com.
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: http://www.apsis.ch/pound/ For Zope: Set up a VirtualHostMonster (=> Mappings) in each Zope which maps the server-name to a folder, from which the site is served: alpha.mydomain.com/alpha/site That should do the trick. Cheer, Maik
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.
On Mon, 5 May 2003, Dennis Allison wrote:
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, respectively. The DNS maps all of these
It looks like what I need is a SiteRoot object ...
Dennis Allison wrote:
It looks like what I need is a SiteRoot object ...
No, you don't need a SiteRoot. Take a VirtualHostMonster and read the Mappings-Tab. Enter your domains/path/mappings and that's all you need to do in combination with Pound. Cheers, Maik
Dennis Allison wrote:
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.)
The configuration with Pound as Frontend on a public ip and Zope as Backend on a local ip works fine for me with a VirtualHostMonster and absolute urls. Do you've tried it? Set up a VHM and enter the correct mappings... Everything should nearly out of the box. Cheers, Maik
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
participants (4)
-
Dennis Allison -
Maik Jablonski -
Paul Winkler -
Robert Segall