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. Thanks, -Brian
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 could run Zopes behind an Apache server and connect via ProxyPass or FastCGI. This would even allow virtual servers on one IP address. Regards, Frank
"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.
Use the source. :)
From z2.py:
-a ipaddress The IP address to listen on. If this is an empty string (e.g. -a ''), then all addresses on the machine are used. The default is %(IP_ADDRESS)s. so in your start script, add: -a xxx.xxx.xxx.xxx where xxx.xxx.xxx.xxx is the IP address you want to hook to. Cheers Bill -- In flying I have learned that carelessness and overconfidence are usually far more dangerous than deliberately accepted risks. -- Wilbur Wright in a letter to his father, September 1900
"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
From: "Michel Pelletier" <michel@digicool.com>
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.
Or, as someone else pointed out, you could use the -a parameter to z2.py. Just run z2.py --usage for all command line options. Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
participants (5)
-
Bill Anderson -
Frank Tegtmeyer -
Martijn Pieters -
Michel Pelletier -
Pearson, Brian Edward (GEA, 056278)