[Zope] authentication & mod_rewrite troubles

david harris jabber@postmaster.co.uk
Thu, 16 Mar 2000 22:27:06 +0000


I cant get to the management screen if I use Apache. I use the correct superuser/password combination which works fine if I go through port 8080. But I get the following:
 "Zope Error
 Zope has encountered an error while publishing this resource. 
 Unauthorized
 You are not authorized to access this resource.
 
 **** No Authorization header found. ***

 Traceback (innermost last):
[snip]
/opt/Zope-2.1.3-linux2-x86/lib/python/ZPublisher/BaseRequest.py, line 442, in traverse
   File /opt/Zope-2.1.3-linux2-x86/lib/python/ZPublisher/HTTPResponse.py, line 551, in unauthorized
 Unauthorized: (see above)"

I cranked up the mod_rewrite loglevel to 9 and got the following  that inicates the module is there and doing *something* ;
"192.168.0.2 - - [16/Mar/2000:00:03:51 +0000] [www.test.net/sid#81a9f0c][rid#81b4964/initial] (2) init rewrite engine with requested uri /cgi-bin/Zope.cgi/manage
192.168.0.2 - - [16/Mar/2000:00:03:51 +0000] [www.test.net/sid#81a9f0c][rid#81b4964/initial] (3) applying pattern '^/Zope/(.*)' to uri '/cgi-bin/Zope.cgi/manage'
192.168.0.2 - - [16/Mar/2000:00:03:51 +0000] [www.test.net/sid#81a9f0c][rid#81b4964/initial] (1) pass through /cgi-bin/Zope.cgi/manage
192.168.0.2 - - [16/Mar/2000:00:03:51 +0000] [www.test.net/sid#81a9f0c][rid#81ba994/subreq] (2) init rewrite engine with requested uri /manage
192.168.0.2 - - [16/Mar/2000:00:03:51 +0000] [www.test.net/sid#81a9f0c][rid#81ba994/subreq] (3) applying pattern '^/Zope/(.*)' to uri '/manage'
192.168.0.2 - - [16/Mar/2000:00:03:51 +0000] [www.test.net/sid#81a9f0c][rid#81ba994/subreq] (1) pass through /manage"
Im all out of ideas: Zope seems OK so I think it is a config issue - but Im out of ideas. My httpd set up is;

"<VirtualHost www.test.net>
    ServerAdmin webmaster@www.test.net
    DocumentRoot "/windows/My Documents/Web sites/www.test.net"
    ServerName www.test.net
    ErrorLog /usr/local/httpd/cgi-bin/www.test.net_log
    CustomLog /usr/local/httpd/cgi-bin/www.test.net_log common
#Added by David - admin
#<Confidence low>
# Zope configuration maps /Zope/ to the Zope.cgi CGI script
ScriptAlias /cgi-bin/ /usr/local/httpd/cgi-bin/
RewriteEngine on
RewriteLog /usr/local/httpd/cgi-bin/zap_rewrite_log
RewriteLogLevel 9
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/Zope/(.*) /usr/local/httpd/cgi-bin/Zope.cgi$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]  
#</confidence>
</VirtualHost> "

Any help via the list or direct email gratefully received.