[Zope] Apache virtual host combined with Zope

Ron Bickers rbickers@logicetc.com
Fri, 6 Apr 2001 12:13:04 -0400


I've been using FastCGI for as long as it was supported and it has been
bullet proof for me.  Here is a sample setup (lines may wrap
unintentionally):

Somewhere in the main config:

AddHandler fastcgi-script .fcgi

<VirtualHost www.bickersfamily.org:80>
ServerAdmin webmaster@bickersfamily.org
DocumentRoot /home/httpd/html
ServerName www.bickersfamily.org

# Redirect everything to /VH/Bickers tree in Zope (except a few select dirs)
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/misc/.*
RewriteCond %{REQUEST_URI} !^/images/.*
RewriteRule ^/(.*)
/zope.fcgi/VirtualHostBase/http/www.bickersfamily.org/VH/Bickers/VirtualHost
Root/$1 [L]

FastCgiExternalServer /home/httpd/html/zope.fcgi -host
localhost:8999 -pass-header Authorization

</VirtualHost>

There does not need to exist a zope.fcgi in /home/httpd/html, but the
directory needs to exist.  Place a single VHM in the root of your Zope tree
and that's all you need in Zope for any number of the above virtual hosts.
Anything URL with /misc or /images will pass through and be handled by
Apache.  Just take those lines out if you don't want anything handled by
Apache.  Management works just fine with this setup too.

I use this same setup for several other sites.  I thought about a How-To,
but it seems most people prefer the Proxy stuff so I never bothered.  If
anyone wants more detail, let me know and maybe I'll put one together.

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com



> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy
> Gimblett
> Sent: Friday, April 06, 2001 10:15 AM
> To: 'Ria Marinussen'; 'zope@zope.org'
> Subject: RE: [Zope] Apache virtual host combined with Zope

> One thing to note: I couldn't find out how to use FastCGI to serve
> _part_ of my Zope site as a virtual. In ProxyPass this is easy
> (which is why I'm using it), but I could only get FastCGI to serve
> the entire Zope tree. I'd prefer to use FastCGI if I could, because
> then I can force all requests to go through Apache, whereas using
> ProxyPass, you could just make a request to :8080, as it were.
>
> Does anyone know a way around this?