[Zope] zope.cgi file under NT installation?

Chris Fassnacht cfassnacht@ssc.wisc.edu
Wed, 29 Sep 1999 15:21:25 -0500


I'm trying to get the ZServer (and Zope) to run behind IIS on NT 4.0.  The
How-To's, list messages, and readme's refer to modifying the zope.cgi file.
Unfortunately, I've got an NT installation of Zope that I installed direct
from precompiled binaries, and I can't find a zope.cgi file anywhere.

I've seen some examples of zope.cgi posted on the list, but these were all
for linux installations.  Does anybody have an example zope.cgi from an NT
installation, and that is intended to run behind IIS, not Apache?  Or,
barring that, would anyone be willing to help make suggestions on modifying
an existing zope.cgi file from a linux installation.  Most of the paths are
obvious to change, but I can't, for instance, find the pcgi.soc, pcgi.pid,
or pcgi.log files.  One example I have is this one:

#!/usr/local/zope/Zope-2.0.0b6-linux2-x86/pcgi/pcgi-wrapper
PCGI_NAME=Zope
PCGI_MODULE_PATH=/usr/lib/python1.5/Zope
PCGI_PUBLISHER=/usr/local/zope/Zope-2.0.0b6-linux2-x86/pcgi/pcgi_publisher.p
y
PCGI_EXE=/usr/bin/python
PCGI_SOCKET_FILE=/usr/local/zope/Zope-2.0.0b6-linux2-x86/var/pcgi.soc
PCGI_PID_FILE=/usr/local/zope/Zope-2.0.0b6-linux2-x86/var/pcgi.pid
PCGI_ERROR_LOG=/usr/local/zope/Zope-2.0.0b6-linux2-x86/var/pcgi.log
PCGI_DISPLAY_ERRORS=1
BOBO_REALM=/usr/local/httpd/cgi-bin/Zope.cgi
BOBO_DEBUG_MODE=1
INSTANCE_HOME=/usr/local/zope/Zope-2.0.0b6-linux2-x86


Also, there seem to be several ways to get Zope running behind another
server:

- single-threaded without using ZServer
- multithreaded using ZServer
- using pcgi_publisher.py
- using ZServer, and not using pcgi_publisher.py
- using Alex Staubo's ISAPI filter?
- perhaps other, obsolete, methods.

I believe the most up to date method, and the one I should be using, is the
multithreaded method using ZServer to handle the pcgi calls.  Am I correct
in assuming that the following how-to from BrianH
(http://www.zope.org/Members/brianh/iis_howto) is the most recent
documentation for this process?  Also, assuming I already have Zope up and
running on the same server running IIS, is this a sufficient set of
instructions, or are there details that might be likely to hang someone
(i.e., me) up?

Thanks very much.

Chris Fassnacht



How-To: Zope 2, IIS, and PCGI
Created by brianh. Last modified on 1999/09/15.
Recipe for setting up Zope with IIS:

1. (If you're not using a source copy of Zope) Copy over the Zope.cgi
file from a non-Windows Zope dist. Put it in your Zope directory top
level, and rename it something like zope.pcgi.

2. Edit zope.pcgi; fix the paths, and add a PCGI_PORT directive
specifying some hitherto unused port (for example, 8090).

3. Copy zope.pcgi and pcgi\bin\pcgi-wrapper.exe into IIS's scripts
directory.

4. Add a new extension mapping to IIS for PCGI. In the Microsoft
Management Console, select your site's Properties, and then under the
'Home Directory' tab click on 'Configuration'. Here you should be able
to add a new extension linking .pcgi to 'pcgi-wrapper %s'.

5. Add the start up option '-p zope.pcgi' when starting Zope.
If you installed Zope as a Windows NT Service, you will have to edit
the registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
<Service Name>\Parameters\start

Add the start up option '-p zope.pcgi' (plus any other z2.py command
line options you feel like adding at the time).

6. Make sure that IIS and Zope are both started up, and try accessing
your server via

http://localhost/scripts/zope.pcgi/

This should give you the same thing as

http://localhost:8080/