[Zope] ZAP

Jeff K. Hoffman jkhoffman@usa.net
Sun, 14 Mar 1999 23:30:59 -0500 (EST)


On Sun, 14 Mar 1999, Shaw, Howard wrote:

> How can I configure ZAP so that all http requests go through the cgi?
> Zope is the only thing running through this apache, so I don't want
> everything on the site prefixed with Zope/ (or anything else, so no, I
> don't just want to know how to change the prefix). This is basically
> what is keeping me on ZopeHTTPServer. 
> 
> [snip]
> 
> How can I make a Zope pcgi accessible as the root of a Zap install?
> Please help.

In looking through my Apache configuration files, I tried to piece
together what changes I made. Here's what I think you need to do.

In httpd.conf, make sure you have these lines (I put them at the end):

Alias / /cgi-bin/Zope.cgi

# Zope configuration maps /Zope/ to the Zope.cgi CGI script
RewriteEngine on
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/(.*) /home/httpd/cgi-bin/Zope.cgi/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]

NOTE: In the RewriteRule directive above, the [e=...] stuff should go
directly after the ...Zope.cgi/$1 section, with a space separating them,
e.g. ...Zope.cgi/$1 [e=HTTP...]

You will need to munge the path in the RewriteRule directive, where it
says /home/httpd to be wherever your document root is.

I did this a while back, and have since switched from Apache to ZServer to
test it out, so I haven't used it lately. However, this should work, as I
never changed the config files after I stopped using Apache.

Let me know if you have problems; I'll do what I can to help.

> Howard C. Shaw III

jkh