[Zope] question about rewriting and vhm
Dylan Reinhardt
zope@dylanreinhardt.com
30 Jun 2003 19:19:01 -0700
First, there are some old docs out there telling you to connect through
cgi, but you probably shouldn't.
Instead, assuming Zope is running on port 8080, use:
RewriteRule ^/z/(.*)
http://localhost:8080/VirtualHostBase/[...]/VirtualHostRoot/_vh_z/$1
Where [...] is what you already had between VirtualHostBase and
VirtualHostRoot
For details on why this works, read about "inside out" hosting here:
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/VirtualHosting.stx
HTH,
Dylan
On Mon, 2003-06-30 at 17:31, Gerard Braad wrote:
> Hello Zopers,
>
>
> i have a problem with a rewriting i use... at first i had authorization
> errors, so i ended up using VHM...
>
> i'm using zope behind apache, so my webserver takes care of the
> virtualhosting. i use apache also for static hosting of files, like
> images and logos... so i placed my zope in a rewritten directory called
> z... so if i open //somehost.com/z/ it opens my zope sites and with
> //somehost.com/ i can access imagery served by apache
>
> the problem is that all my a hrefs containing ./ are not automatically
> rewritten to ./z/ or /z/. is it possible to make this work? have tried
> rewriting it, but did not succeed...
>
> this is my apache rewriterule....
> RewriteRule ^/z(.*)
> /home/internet/cgi-bin/zope.cgi/VirtualHostBase/http/%{HTTP_HOST}:80/sites/somehost.com/gbraad/VirtualHostRoot$1 \ [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
>
> greets,
>
>
> Gerard