Greetings all, I've been running Zope with the zserver web server for a while now, and the setup was a breeze. I've been very impressed with Zope. Now I've been tasked with installing Zope on another machine which is running Apache 1.3.11. From the documentation it looks like Zope+PCGI is going to suit my needs the best, but I'm having problems getting it to work (no surprise, given the large number of HOWTO's on the subject). I can get to the Welcome to Zope! page, and I can view the QuickStart material, but I'm unable to log in to the management interface. I'm also unable to access Zope at: www.mydomain.com/Zope only at: www.mydomain.com/cgi-bin/Zope.cgi so I'm sure it's an Apache/rewrite problem. I've made sure that the username and password are what I think they are via the python script zpasswd.py, and given that I can access the Welcome to Zope/QuickStart material I think I've got Zope configured correctly. After reading through the various HOWTO's on the subject I've got my httpd.conf file entries set as follows (the Gotchas for Zope Beginners HOWTO was very helpful, as was the Zope and Apache on RedHat 6.1 HOWTO, even though they were slightly contradictory on the syntax for the RewriteRule). I'm using RedHat 6.0, Zope 2.1.4, Python 1.5.2, and Apache 1.3.11. Zope was installed from source, Python and Apache from RPMs. Here's the relavent bits from Apache's httpd.conf file... LoadModule rewrite_module modules/mod_rewrite.so AddModule mod_rewrite.c ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/" # # "/home/httpd/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/home/httpd/cgi-bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> # Zope configuration maps /Zope/ to the Zope.cgi CGI script RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/Zope(.*) /home/httpd/cgi-bin/Zope.cgi$1 \ [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l] (Note: the RewriteRule is all on one line, without the \. The trailing / after ^/Zope and after Zope.cgi have been removed per the Gotchas for Zope Beginners HOWTO.) I'm at a loss here. I'm positive I'm missing something obvious, but I can't figure out what it is. Thanks for the help, Jeff Robertson jeffr@odeon.net
On Mon, 28 Feb 2000 jeffr@odeon.net wrote:
# Zope configuration maps /Zope/ to the Zope.cgi CGI script RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/Zope(.*) /home/httpd/cgi-bin/Zope.cgi$1 \ [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
(Note: the RewriteRule is all on one line, without the \. The trailing / after ^/Zope and after Zope.cgi have been removed per the Gotchas for Zope Beginners HOWTO.)
I hope you got your setup working, Jeff. Your rewrite rules look good to me. But I want to take this opportunity to make a (tested) alternate suggestion for the rewrite rule. The above rewrite rule has the unfortunate feature that URLs like ".../Zopestuff/etc" match the rewrite rule and get turned into the (not found) path .../cgi-bin/Zope.cgistuff/etc. This isn't a problem normally, but you can perhaps imagine having Zope under a directory with a given name but wanting another URL with that same name as a prefix substring to also work (.../news and .../newsimages perhaps?). I've come up with what I think is a better regexp for use in this kind of rewrite rule, mostly to avoid the surprise factor of later having a Zopestuff type URL mysteriously fail to work on me someday: .../Zope(/.*)?$ which is mapped to .../cgi-bin/Zope.cgi/$1 The ?$ means that the /<stuff> all the way to the end of the URL is zero or one time. So Zope by itself matches, and Zope followed by a / matches, and Zope followed by /stuff matches, but Zopestuff does not. FWIW --RDM
participants (2)
-
jeffr@odeon.net -
R. David Murray