[Zope] PCGI + ZServer with the same Zope installation

Amos Latteier amos@aracnet.com
Thu, 05 Aug 1999 23:04:45 -0700


At 02:23 PM 8/6/99 +0900, Brian Hooper wrote:
>I couldn't find this documented anywhere, so I decided I would just
>see if I could get an answer from the voice of experience - is it
>possible to run Zope both from PCGI and ZServer at the same time?
>
>I am building a site where I want some stuff to be over SSL, so I
>have to use PCGI for that stuff, but I want to use ZServer to serve
>out the rest of the (non-secure) part of the site.  Is this possible?

Yes. That's how we run most of our sites.

>Are pcgi_publisher.py and ZServer 'aware' of each other somehow?
>Setting up things this way wouldn't result in two Zopes getting started,
>would it?

The answer is to use ZServer to service the PCGI requests.
pcgi_publisher.py is never run.

Simply point ZServer at your PCGI info file and it will do what's necessary
(on Unix and win32) to communicate with the pcgi wrapper. Use z2.py -p switch.

The only problem to look out for is if your info file mentions a valid
pcgi_publisher, and if the pcgi wrapper is called when ZServer isn't
running, then the pcgi wrapper will start up the publisher. The effectively
blocks you from starting ZServer later, since the pcgi_publisher will have
a lock on the object database. The way I avoid this is to put a bogus
pcgi_publisher entry in the info file.

This is covered in the ZServer README.txt and INSTALL.txt files.

-Amos