[Zope-dev] ANNOUNCE: The Instance Product Patch

Jimmie Houchin jhouchin@texoma.net
Wed, 10 Mar 1999 17:40:24 -0600


Many, many thanks!!! :)

This pretty much does what I asked about in "Zope's Organization for
Virtual Servers".

Nice, clean seperation of Zope install from the user's database and products.

Once again, mucho gracias senor.

Jimmie Houchin


At 12:53 PM -0800 3/10/99, Scott Robertson wrote:
>I just uploaded this patch to the contrib section of the zope web site.
>
>>From the README....
>
>INSTANCE PRODUCTS PATCH
>
>This patch is useful for people who would like to run multiple
>instances of Zope from the same source directory, but have each
>instance have it's own database and product directories. Actually this
>patch allows each instance to share the Products in
>SOFTWARE_HOME/Products and to let the instance have it's own personal
>products under INSTANCE_HOME/Products.
>
>SOFTWARE_HOME is an environment variable that points to the directory
>that Zope is installed in, normally Zope-version/lib/python.
>INSTANCE_HOME is an environment variable that points to the directory
>that contains the var directory which in itself contains the Zope
>Object Database, normally Zope-version/.
>
>When Zope first starts, it loads all the products installed under
>SOFTWARE_HOME/Products/ into zope. Additionally if you set
>INSTANCE_HOME to point to a directory other than Zope-version/, Zope
>looks for a directory named var/ under INSTANCE_HOME and either
>creates the Object Database in that directory or opens the
>pre-existing one.
>
>With this patch Zope will also look under INSTANCE_HOME/Products/ for
>additional products to install, if the environment variable
>ALLOW_INSTANCE_PRODUCTS equals 'Yes'.
>
>The best way to accomplish all this is to use apache with pcgi and have
>something like the following lines in your configuration file.
>
>
>--Example httpd.conf file------------------------------
>#...Other configuration directives.
>
># Zope configuration maps / to the Zope.cgi CGI script and passes
># authentication information.
>
>RewriteEngine on
>RewriteOptions inherit
>RewriteCond %{HTTP:Authorization}  ^(.*)
>RewriteRule ^/(.*) /home/httpd/cgi-bin/Zope.cgi/$1
>[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
>
>
>
># Launch an instance of zope for this Virtual Host
><VirtualHost www.bogus.com>
>ServerAdmin webmaster@bogus.com
>
># Inherit the above rewrite rule
>RewriteEngine on
>RewriteOptions inherit
>
>DocumentRoot /home/bogus
>ServerName www.bogus.com
>SetEnv INSTANCE_HOME /home/bogus/
>SetEnv PCGI_SOCKET_FILE /home/bogus/var/pcgi.soc
>SetEnv PCGI_PID_FILE /home/bogus/var/pcgi.pid
>SetEnv PCGI_ERROR_LOG  /home/bogus/var/pcgi.log
>SetEnv ALLOW_INSTANCE_PRODUCTS Yes
>User bogus
>Group bogus
></VirtualHost
>
>
>---------------------------------------------------
>- Scott Robertson             Phone: 714.972.2299 -
>- CodeIt Computing            Fax:   714.972.2399 -
>-                http://codeit.com                -
>---------------------------------------------------