Fwd: RE: [Zope] Apache virtual host combined with Zope

Sherwood Robinson srobinson@fredericksburg.com
Mon, 09 Apr 2001 11:00:59 -0400


--=====================_10472999==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

Woops! forgot to reply to all on this one


>Date: Mon, 09 Apr 2001 09:25:32 -0400
>To: <patrick@spice.eahd.or.ug>
>From: Sherwood Robinson <srobinson@fredericksburg.com>
>Subject: RE: [Zope] Apache virtual host combined with Zope
>
>Here is how I would handle this with proxypass:
>In Virtualhost for hostone:
>
>ProxyPass       /       http://my.ip.he.re:8080/hostone/
>ProxyPassReverse        /       http://my.ip.he.re:8080/hostone/
>ProxyPass       /misc_          http://my.ip.he.re:8080//misc_
>ProxyPass       /p_     http://my.ip.he.re:8080//p_
>
>in Virtualhost for hosttwo
>ProxyPass       /       http://my.ip.he.re:8080/hosttwo/
>ProxyPassReverse        /       http://my.ip.he.re:8080/hosttwo/
>ProxyPass       /misc_          http://my.ip.he.re:8080//misc_
>ProxyPass       /p_     http://my.ip.he.re:8080//p_
>
>
>Now in zope manage goto your hostone folder and add the siteroot like this
>
>  Base: www.hostone.com
>Path: /
>
>In Zope manage goto your hosttwo folder and add the siteroot
>Base: www.hosttwo.com
>path: /
>
>Should do the trick... just remember if you want to manage anything in the 
>root folder of your zope install you will need to use
>http://my.ip.here:8080/manage
>
>Hope this helps
>
>
>At 01:18 PM 4/7/2001 +0300, you wrote:
>>A related question; what if I want two virtual hosts...
>>www.hostone.com and
>>www.hosttwo.org
>>
>>And in my zope installation I want to have this sort of folder
>>organisation:
>>
>>root|
>>     |->hostone
>>     |->hosttwo
>>
>>and I want zope to serve www.hostone.com from hostone and www.hosttwo.org
>>from hosttwo.
>>
>>I tried a proxy pass for
>>                 www.hostone.com to http://my.ip.he.re:8080/
>>and another for
>>                 www.hosttwo.org to http://my.ip.he.re:8080/
>>and two site roots in my zope installation;
>>   In hostone:
>>         baseurl=http://www.hostone.com
>>         path=/
>>   In hosttwo
>>         baseurl=http://www.hosttwo.org
>>         path=/
>>The problem is that when I did that, I could not get to any management
>>screen; in short my zope just died and I had to reinstall; How should I
>>have gone about this?
>>
>>Thanks.
>>
>>On Fri, 6 Apr 2001, Oleg Broytmann wrote:
>>
>> > On Fri, 6 Apr 2001, Timothy Wilson wrote:
>> > > On Fri, 6 Apr 2001, Oleg Broytmann wrote:
>> > > > Ah, so your problem is different from what I though. I thought you 
>> want to
>> > > > serve some dirs from Apache, and some from Zope.
>> > >
>> > > Oleg,
>> > >
>> > > What you're talking about *is* what I want to do. But i haven't been 
>> able to
>> > > figure out for sure what I need to do. Let me give you an example...
>> > >
>> > > On Debian, my root for html document is /var/www. I can use a 
>> virtual host
>> > > entry in my apache config and ProxyPass to direct all requests for 
>> spam.org
>> > > to spam.org:8080. No problem there. Let's say, however, that I have a
>> > > /var/www/eggs directory that I would like served by apache. Can 
>> ProxyPass do
>> > > that by itself.
>> > >
>> > > In other words,
>> > >
>> > > www.spam.org should come from Zope at spam.org:8080
>> > > www.spam.org/eggs should come from Apache (/var/www/eggs)
>> > >
>> > > Do I need a Rewrite rule?
>> >
>> >    No. Use <Location> inside your <VirtualServer>:
>> >
>> > <Location /egg>
>> > ProxyPass ...
>> > </Location>
>> >
>> >    Thus some parts of the virtual server will be served from as usual, and
>> > some (started with /egg) will be served by different rules.
>> >
>> > Oleg.
>> > ----
>> >      Oleg Broytmann     http://www.zope.org/Members/phd/    phd@phd.pp.ru
>> >            Programmers don't die, they just GOSUB without RETURN.
>> >
>> >
>> > _______________________________________________
>> > 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 )
>
>----------------------------------------------------
>Sherwood Robinson
>Hostmaster
>The Free Lance-Star/Internet Department
>srobinson@fredericksburg.com
>http://www.fredericksburg.com
>
>616 Amelia St.
>Fredericksburg, VA 22401
>540-374-5000 ext. 5657

--=====================_10472999==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
Woops! forgot to reply to all on this one<br>
<br>
<br>
<blockquote type=cite class=cite cite>Date: Mon, 09 Apr 2001 09:25:32
-0400<br>
To: &lt;patrick@spice.eahd.or.ug&gt;<br>
From: Sherwood Robinson &lt;srobinson@fredericksburg.com&gt;<br>
Subject: RE: [Zope] Apache virtual host combined with Zope<br>
<br>
Here is how I would handle this with proxypass:<br>
In Virtualhost for hostone:<br>
<br>
ProxyPass <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080/hostone/" eudora="autourl">http://my.ip.he.re:8080/hostone/</a><br>
ProxyPassReverse<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080/hostone/" eudora="autourl">http://my.ip.he.re:8080/hostone/</a><br>
ProxyPass<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/misc_<x-tab>&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080//misc" eudora="autourl">http://my.ip.he.re:8080/</a><a href="http://my.ip.he.re:8080//misc" eudora="autourl"><font color="#0000FF"><u>/misc</a>_</u></font>
<br>
ProxyPass <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/p_
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080//p" eudora="autourl">http://my.ip.he.re:8080/</a><a href="http://my.ip.he.re:8080//p" eudora="autourl"><font color="#0000FF"><u>/p</a>_<br>
<br>
</u></font>in Virtualhost for hosttwo<br>
ProxyPass <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080/hosttwo/" eudora="autourl">http://my.ip.he.re:8080/hosttwo/</a><br>
ProxyPassReverse<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080/hosttwo/" eudora="autourl">http://my.ip.he.re:8080/hosttwo/</a><br>
ProxyPass<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/misc_<x-tab>&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080//misc" eudora="autourl">http://my.ip.he.re:8080/</a><a href="http://my.ip.he.re:8080//misc" eudora="autourl"><font color="#0000FF"><u>/misc</a>_</u></font>
<br>
ProxyPass <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>/p_
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://my.ip.he.re:8080//p" eudora="autourl">http://my.ip.he.re:8080/</a><a href="http://my.ip.he.re:8080//p" eudora="autourl"><font color="#0000FF"><u>/p</a>_<br>
<br>
<br>
</u></font>Now in zope manage goto your hostone folder and add the
siteroot like this<br>
<br>
&nbsp;Base:
<a href="http://www.hostone.com/" eudora="autourl">www.hostone.com</a><br>
Path: /<br>
<br>
In Zope manage goto your hosttwo folder and add the siteroot<br>
Base:
<a href="http://www.hosttwo.com/" eudora="autourl">www.hosttwo.com</a><br>
path: /<br>
<br>
Should do the trick... just remember if you want to manage anything in
the root folder of your zope install you will need to use<br>
<a href="http://my.ip.here:8080/manage" eudora="autourl">http://my.ip.here:8080/manage</a><br>
<br>
Hope this helps<br>
<br>
<br>
At 01:18 PM 4/7/2001 +0300, you wrote:<br>
<blockquote type=cite class=cite cite>A related question; what if I want
two virtual hosts...<br>
<a href="http://www.hostone.com/" eudora="autourl">www.hostone.com</a>
and<br>
<a href="http://www.hosttwo.org/" eudora="autourl">www.hosttwo.org</a><br>
<br>
And in my zope installation I want to have this sort of folder<br>
organisation:<br>
<br>
root|<br>
&nbsp;&nbsp;&nbsp; |-&gt;hostone<br>
&nbsp;&nbsp;&nbsp; |-&gt;hosttwo<br>
<br>
and I want zope to serve <a href="http://www.hostone.com/" eudora="autourl">www.hostone.com</a> from hostone and <a href="http://www.hosttwo.org/" eudora="autourl">www.hosttwo.org</a><br>
from hosttwo.<br>
<br>
I tried a proxy pass for<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://www.hostone.com/" eudora="autourl">www.hostone.com</a> to <a href="http://my.ip.he.re:8080/" eudora="autourl">http://my.ip.he.re:8080/</a><br>
and another for<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><a href="http://www.hosttwo.org/" eudora="autourl">www.hosttwo.org</a> to <a href="http://my.ip.he.re:8080/" eudora="autourl">http://my.ip.he.re:8080/</a><br>
and two site roots in my zope installation;<br>
&nbsp; In hostone:<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>baseurl=http://www.hostone.com<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>path=/<br>
&nbsp; In hosttwo<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>baseurl=http://www.hosttwo.org<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>path=/<br>
The problem is that when I did that, I could not get to any management<br>
screen; in short my zope just died and I had to reinstall; How should I<br>
have gone about this?<br>
<br>
Thanks.<br>
<br>
On Fri, 6 Apr 2001, Oleg Broytmann wrote:<br>
<br>
&gt; On Fri, 6 Apr 2001, Timothy Wilson wrote:<br>
&gt; &gt; On Fri, 6 Apr 2001, Oleg Broytmann wrote:<br>
&gt; &gt; &gt; Ah, so your problem is different from what I though. I thought you want to<br>
&gt; &gt; &gt; serve some dirs from Apache, and some from Zope.<br>
&gt; &gt;<br>
&gt; &gt; Oleg,<br>
&gt; &gt;<br>
&gt; &gt; What you're talking about *is* what I want to do. But i haven't been able to<br>
&gt; &gt; figure out for sure what I need to do. Let me give you an example...<br>
&gt; &gt;<br>
&gt; &gt; On Debian, my root for html document is /var/www. I can use a virtual host<br>
&gt; &gt; entry in my apache config and ProxyPass to direct all requests for spam.org<br>
&gt; &gt; to spam.org:8080. No problem there. Let's say, however, that I have a<br>
&gt; &gt; /var/www/eggs directory that I would like served by apache. Can ProxyPass do<br>
&gt; &gt; that by itself.<br>
&gt; &gt;<br>
&gt; &gt; In other words,<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://www.spam.org/" eudora="autourl">www.spam.org</a> should come from Zope at spam.org:8080<br>
&gt; &gt; <a href="http://www.spam.org/eggs" eudora="autourl">www.spam.org/eggs</a> should come from Apache (/var/www/eggs)<br>
&gt; &gt;<br>
&gt; &gt; Do I need a Rewrite rule?<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp; No. Use &lt;Location&gt; inside your &lt;VirtualServer&gt;:<br>
&gt;<br>
&gt; &lt;Location /egg&gt;<br>
&gt; ProxyPass ...<br>
&gt; &lt;/Location&gt;<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp; Thus some parts of the virtual server will be served from as usual, and<br>
&gt; some (started with /egg) will be served by different rules.<br>
&gt;<br>
&gt; Oleg.<br>
&gt; ----<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Oleg Broytmann&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.zope.org/Members/phd/%A0%A0%A0" eudora="autourl">http://www.zope.org/Members/phd/&nbsp;&nbsp; </a> phd@phd.pp.ru<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Programmers don't die, they just GOSUB without RETURN.<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Zope maillist&nbsp; -&nbsp; Zope@zope.org<br>
&gt; <a href="http://lists.zope.org/mailman/listinfo/zope" eudora="autourl">http://lists.zope.org/mailman/listinfo/zope</a><br>
&gt; **&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp; **<br>
&gt; (Related lists -<br>
&gt;&nbsp; http://lists.zope.org/mailman/listinfo/zope-announce<br>
&gt;&nbsp; http://lists.zope.org/mailman/listinfo/zope-dev )<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Zope maillist&nbsp; -&nbsp; Zope@zope.org<br>
<a href="http://lists.zope.org/mailman/listinfo/zope" eudora="autourl">http://lists.zope.org/mailman/listinfo/zope</a><br>
**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp; **<br>
(Related lists - <br>
&nbsp;http://lists.zope.org/mailman/listinfo/zope-announce<br>
&nbsp;http://lists.zope.org/mailman/listinfo/zope-dev ) </blockquote>
<x-sigsep><p></x-sigsep>
----------------------------------------------------<br>
Sherwood Robinson<br>
Hostmaster<br>
The Free Lance-Star/Internet Department<br>
srobinson@fredericksburg.com<br>
<a href="http://www.fredericksburg.com/" eudora="autourl">http</a>://www<a href="http://www.fredericksburg.com/" eudora="autourl">.fredericksburg.com</a><br>
<br>
616 Amelia St.<br>
Fredericksburg, VA 22401<br>
540-374-5000 ext. 5657<br>
</html>

--=====================_10472999==_.ALT--