[Zope] Multiple Sites and Apache

Thomas T. Veldhouse veldy@veldy.net
Wed, 18 Jul 2001 10:16:01 -0500


I tried this, but unfortunately, some links get broken.  For instance, the
link to the zope image in std_html_footer (via the "ZopeAttributionButton")
gets broken, because it strips the Zope out of the URL and then the image
doesn't work for "Powered By Zope".

Other than that -- it seems alright.

   RewriteEngine on
   RewriteRule ^/Zope$ /Zope/ [R]
   RewriteCond %{HTTP:Authorization} ^(.*)
   RewriteRule ^/Zope/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/$1
[env=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
   RewriteRule ^/site1/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/site1/$1
[env=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
   RewriteRule ^/site2/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/site2/$1
[env=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]

I also put a "Virtual Host Monster" in the folder, but it doesn't seem to
have done anything at all.

Tom Veldhouse
veldy@veldy.net

----- Original Message -----
From: "Philip Aylesworth" <paylesworth@stclaircollege.ca>
To: "Thomas T. Veldhouse" <veldy@veldy.net>; <zope@zope.org>
Sent: Wednesday, July 18, 2001 9:44 AM
Subject: Re: [Zope] Multiple Sites and Apache


> Tom,
>
> You are adding that /Zope/ to your path in your rewrite rules. Try a
> rewrite rule for each folder you what accessed directly. I think if you
> add the following to your httpd.conf it should do what you want. Then
> use /Zope/manage to manage your zope stuff, or you can add authorization
> statements for those to directories.
>
>   RewriteEngine on
>   RewriteRule ^/Zope$ /Zope/ [R]
> ## start add
>   RewriteRule ^/site1/(.*)
/usr/local/www/cgi-bin.default/Zope.cgi/site1/$1
> RewriteRule ^/site2/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/site2/$1
> ## end add
>   RewriteCond %{HTTP:Authorization} ^(.*)
>   RewriteRule ^/Zope/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/$1
>   [env=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
>
> Phil.
>
> Thomas T. Veldhouse wrote:
>
> >>Why not ProxyPass + SiteRoot?  2 different ProxyPass statements, and a
> >>corresponding SiteRoot object in each subdirectory?
> >>
> >
> > I am not familiar with ProxyPass.  However, I did try SiteRoot and
whatever
> > it did, it caused the Zope management interface to become unaccessable
(both
> > from Apache and 8080).  Hmm ?
> >
> > BTW -- I am running the latest stable Zope (2.3.3 ?) on FreeBSD
4.3-STABLE
> > via the port and it uses Python 2.0.
> > My current httpd.conf file has to following Zope related configuration:
> >
> >   RewriteEngine on
> >   RewriteRule ^/Zope$ /Zope/ [R]
> >   RewriteCond %{HTTP:Authorization} ^(.*)
> >   RewriteRule ^/Zope/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/$1
> > [env=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
> >   <Directory /usr/local/www/cgi-bin.default>
> >         Options +ExecCGI
> >   </Directory>
> >
> > Tom Veldhouse
> > veldy@veldy.net
> >
> >
> >
> >
> > _______________________________________________
> > 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 )
> >
> >
>
>