[Zope] - Using ZPublisher (Bobo) alone
skip@calendar.com (Skip Montanaro)
skip@calendar.com (Skip Montanaro)
Wed, 6 Jan 1999 09:58:27 -0500 (EST)
Chris> I would like to use ZPublisher alone (having had some success
Chris> with Bobo) under linux.
Chris> I can't find installation instructions for ZPublisher. I've got
Chris> the whole Zope thing up and running from the source, but I'm not
Chris> sure what to do if I just want to do Bobo things....
Chris> Could some kind soul point me at the FM?
Not sure there is one. Here's what I've been doing.
1. Run ZopeHTTPServer from the Zope-1.9.0-src directory using the Python
script
import ZopeHTTPServer, sys, os
try:
open('srv.pid', 'w').write('%d'%os.getpid())
ZopeHTTPServer.main(("-h 127.0.0.2",
"-p 8043",
"/usr/local/lib/automatrix/python/z.py",
"BOBO_DEBUG_MODE=1",
"SCRIPT_NAME=",
"SERVER_NAME=concerts.calendar.com",
"SERVER_PORT=8080"))
except KeyboardInterrupt:
sys.exit(255)
This works okay except the except clause doesn't ever catch keyboard
interrupts. I eventually gave up and now use "kill `cat srv.pid`" to zap
the server. z.py is the module that's published. A watcher shell script
then restarts it. I had to create an unwritable file named "core" to
prevent the core dumps that the inevitably occur if the server has processed
any requests.
2. I built a run Apache (1.3.3) with both mod_proxy and mod_rewrite enabled.
I then use a number of rewrite rules to smash a couple related CGI
scripts into a single URI called /search. That is then proxied to the Z
Publisher using
RewriteRule ^/search$ http://127.0.0.2:8043/search [P]
"search" is a published function in z.py.
Thanks to Andreas Kostyrka and Amos Latteier for developing the plumbing in
ZopeHTTPServer necessary to do this.
Any ideas about the core dumps? I will admit that for the time being I have
been more concerned with getting things going than investigating the problem
so I have even tried to debug it. One thing I did notice is that it doesn't
seem to drop a core file if the server hasn't handled any requests.
Skip Montanaro | Mojam: "Uniting the World of Music" http://www.mojam.com/
skip@calendar.com | Musi-Cal: http://concerts.calendar.com/
518-372-5583