[Zope] virtual hosting, Zope.cgi, and apache

Steve Spicklemire steve@spvi.com
Mon, 30 Jul 2001 01:59:26 -0500 (EST)


Hi Jack,

   I know it's sorta confusing. ZServer *is* doing pcgi. In my
   experience you get a little better performance using ProxyPass, but
   it's not a huge effect (no.. I haven't done any benchmarks.. just
   casual observation). The only real problem I've had with
   pcgi/rewrite is trying to server larger files. In these cases you
   may be better off server the files directly with apache, but then
   you lose Zope's nice security system. Of course, you can also mix
   Rewrite and ProxyPass if you like, Rewrite for directing stuff to
   apache (e.g., /static, /mailman, /cgi-bin) and ProxyPass (or [p] in
   rewrite I think is equivalent) for Zope.

-steve

On Sunday, July 29, 2001, at 10:43 PM, Jack Coates wrote:

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!


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )