[Zope] Ahaaaa! Success Startup Authentication !!
Stefan Bund
asbund@gmx.de
14 Jun 1999 08:31:46 +0200
My apache version is 1.3.0.
I also set up Zope using pcgi access. I'm using ZServer, but the
apache setup should be the same. For me the doc's worked pretty
well, there was just one problem: I had played around with several
different methods of Access to Zope. At one time I had an entry in
srm.conf saying
ScriptAlias /Zope/ /usr/local/Zope-1.10.2/Zope.cgi
This worked seamlessly if I let the apache server do the
authentification (with appropriate entries in access.conf). But when I
switched to Zope's own authentication, I had to REMOVE all ScriptAlias
lines !!! And replace them with a simple RewriteRule in httpd.conf:
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/Zope/(.*) /usr/local/Zope-1.10.2/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
(straight from the Doc). I have no problems with this setup. The
important thing is: No ScriptAlias if you have a rewrite rule !! (I
found this using the log feature of mod_rewrite with a fairly high
log-level).
At first I wondered, why I did not have to tell Apache, that Zope.cgi
was a cgi, but as I understand it (from the log-output of mod_rewrite)
the 't=application/x-httpd-cgi' forces the interpretation as
cgi-Script.
I hope, this is helpful :-)
Stefan.