[Zope] Multiple Sites and Apache

Philip Aylesworth paylesworth@stclaircollege.ca
Wed, 18 Jul 2001 15:59:48 -0400


Tom,

Zope seems to have some hidden directories that it uses for some of its 
image files. If you look at the source for a page you will see that it 
uses http://www.example.com/p_/ZopeButton for the zope button. If you 
want to use it then you would have to add another rewrite rule for p_ 
directory (there may be others, too, anyone know?).

RewriteRule ^/p_/(.*) /usr/local/www/cgi-bin.default/Zope.cgi/p_$1


I assume that you are using apache for other non-Zope stuff? If not then 
you don't need apache at all, just use zope's server.

I don't think you need Virtual Host Monster because you are not doing 
virtual hosting (more than one domain on the same instance of Zope). I 
am using it and apache rewrite for virtual hosting several domains on 
one Zope instance.

Phil.



Thomas T. Veldhouse wrote:

> 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 )
>>>
>>>
>>>
>>
> 
> 
> _______________________________________________
> 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 )
> 
>