[Zope] Apache in front of ZServer

Oliver Bleutgen Oliver Bleutgen <myzope@gmx.net>
Tue, 24 Oct 2000 16:18:47 +0200


> * jornd@falch.net (JXrn Helge B. Dahl)

> On a second thought: What I _really_  want (I think, unless someone
> tells me differently :-) ) is a conditional ProxyPass, to tell apache
> to redirect everything _unless_ the URI is /static (or something).

> But this is probably something for apache geeks.

Jørn,

I ain't no apache geek, but I took a look at
two nice how-tos on zope.org.
The first one 
http://www.zope.org/Members/anser/apache_zserver/

describes how to get apache to work with zope via 
proxypass etc., and the second one describes how
to achieve what you describe above ... and I don't
find it anymore on zope.org :(

Anyway, 

this is what you want:

  RewriteEngine On
  RewriteRule ^/local/ - [L]
  RewriteRule ^/(.*) http://localhost:10080/my_host/$1 [P]


The [L] stops the rewriting-process if and only if the uri is of the
form http://yourhostname/local/
If not it goes on and passes the request to localhost port 10080,
directory my_host, where zope resides (at least on my server).
Combine that with virtual-host directive of apache and you are
as flexibel as one can get.
Naturally /local need not to be the only folder which isn't proxied
to zope.
The only problem is that apache doesn't care for zope's authentication
machinery, I would love to have a module for apache which could enable
that (nice dream...). But it may be solvable by using mysql/postgres as
a userdatabase for zope & apache...

cheers,
oliver