So you've got your Apache server serving up static HTMLcontent, and you've got some cool new Zope applications as well. Now, incase you were wondering, it is possible for the twain to meet - and thisarticle tells you how, with a step-by-step guide to the process ofserving up your Zope content through Apache.
Now, while the procedure on the previous page does seem to work in somecases (at least according to all the documentation I read and some ofthe posts in the online newsgroups), I have to admit that, despite mybest efforts, I was unable to get the URL rewriting to work correctly onmy system. If you had the same problem, then be of stout heart, becausethere does exist an alternative solution.
This alternative is FastCGI, which works just as well, and is mucheasier to install and use. First, untar the Apache distribution to adirectory on your system.
$ cd /tmp/sources
$ tar -xzvf apache_1.3.20.tar.gz
Next, untar the FastCGI distribution
$ tar -xzvf mod_fastcgi-2.2.12.tar.gz
and move the contents of the newly-created directory to<apache-source>/src/modules/fastcgi
The FastCgiExternalServer directive defines the file"/usr/local/apache/htdocs/zope" as a FastCGI application, one that willbe started and stopped manually. It also means that any request for thisfile from a client browser will automatically be handled by FastCGI.
The "-pass-header Authorization" argument to the FastCgiExternalServerdirective instructs Apache to pass authentication information to theFastCGI application; this will (hopefully) solve the authenticationproblems experienced with PCGI.
Now, shift the action over to Zope. You'll need to start Zope with acouple of additional configuration parameters, so that it knows it needsto use FastCGI. Here's how:
$ cd /usr/local/Zope/
$ ./bin/python z2.py -D -F 8889
This tells Zope to use FastCGI, and to run on port number 8889. If you'dprefer to use a UNIX domain socket instead of a TCP port, you canreplace the port number with the path to the socket.
Zope should now start and run silently in the foreground.
Finally, start Apache.
$ /usr/local/apache/bin/apachectl start
At this point, you should be able to browse to the URLhttp://your.server/zope/ and view the Zope screens. All content underthe /zope/ "directory" will be served up by Zope; all other content willbe served by Apache.
You'll notice, also, that if you go to the Zope management interface, athttp://your.server/zope/manage/, you'll have no trouble logging in (solong as you have the right credentials). Thus, FastCGI very neatlysolves the authentication problem PCGI had - and that's why I'drecommend this approach over the previous one.