[Zope] virtual hosting, Zope.cgi, and apache
Jack Coates
jack@monkeynoodle.org
Sun, 29 Jul 2001 20:43:02 -0700 (PDT)
Hi all,
I've always written everything in a text editor, so this whole app
server thing is new to me... I've done my homework though, and Zope
looks like what I want to build some better sites. I'm having trouble
with virtual hosting, though.
Here's what I've got (on Mandrake Linux 7.2, Apache 1.3.14):
Apache on port 80, (3) name-based virtual hosts: works
Apache mod_rewrite directives pointing to zope: works
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog "/var/log/httpd/baydoula-rewrite_log"
RewriteLogLevel 1
# Let Apache handle requests for non-Zope content
RewriteRule ^/static/(.*) /var/www/baydoula/$1 [L]
RewriteRule ^/icons/(.*) - [L]
RewriteRule ^/cgi-bin/(.*) - [L]
RewriteRule ^/webalizer/(.*) - [L]
RewriteRule ^/mailman/(.*) - [L]
RewriteRule ^/zopedocs/(.*) - [L]
# Ensure the documentroot is served by Zope and Apache passes
# authentication headers to Zope as well.
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) /var/www/baydoula/zope/Zope.cgi$1 \
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,L]
</IfModule>
Zope.cgi goes into Zope, in which everything seems to work.
But, it's all one Zope. Reading the fine manual, it looks like I need to
do a VirtualHostMonster and call subfolders, but it also looks like you
need to use zserver to do that.
1) What's the best way to support three virtual hosts?
2) I assume Zserver would give better performance than Zope.cgi. Is it a
big pain to switch? Seems like I would remove the pcgi .rpm and install
the zserver .rpm, change the rewrites from files to localhost URLs, and
restart zope and apache?
3) Failing that, are there a few files I can copy around to make
separate installations? Bad idea (I suspect so, upgrades would get
uglier than usual).
Thanks,
--
Jack Coates
Monkeynoodle: It's what's for dinner!