[Zope] Listening on specific interfaces

Michel Pelletier michel@digicool.com
Wed, 01 Mar 2000 19:29:08 -0800


"Pearson, Brian Edward (GEA, 056278)" wrote:
> 
> All - Have a problem which I am certain many of you have already
> encountered.
> 
> With most web servers, you can create specific web server instances that
> listen to virtual network interfaces on the server (virtual IP addresses).
> For example, I can have multiple httpd instances, with httpd1 listening to
> 192.168.1.101 and httpd2 listening to 192.168.1.102 on a box where the
> physical IP address is 192.168.1.100.  This is configurable within the web
> server.
> 
> I want to be able to have Zope listen to a specific network interface, i.e.
> - a virtual IP address that has been created on the server.  This will allow
> me to have multiple Zope sites running on the same machine.  How can this be
> accomplished?  Any/all suggestions are greatly appreciated.

You need to hack the z2.py file.  Go down near the bottom (look for the
string '# HTTP Server') and you will see that the HTTP server is fired
up on the IP_ADDRESS interface.  This variable is defined on line 252
and the default is an empty string '' which means, 'all interfaces'.

You can hack the code here to do anything you want, define a bunch of
interface variables, etc...

Yes, this needs to be done better, but short of comming up with a conf
file like apache and dealing with all that, it's probably no so
realistic.  z2.py is currently config'ed with command line options,
which gets out of control after a while.

-Michel