[Zope-CMF] VirtualHostMonster (Was Re: Zope-CMF digest, Vol 1 #726 - 13 msgs)

Steve Spicklemire steve@spvi.com
Sun, 12 Aug 2001 05:55:12 -0500


This didn't seem to make it so I thought I'd try again..

-steve

Begin forwarded message:

> From: Steve Spicklemire <steve@spvi.com>
> Date: Sun Aug 12, 2001  05:44:18 AM America/Indianapolis
> To: waltonl <waltonl@babbage.franklin.edu>
> Cc: Steve Spicklemire <steve@spvi.com>, zope-cmf@zope.org
> Subject: Re: [Zope-CMF] Re: Zope-CMF digest, Vol 1 #726 - 13 msgs
>
>
> Hi Lynn,
>
> 	Hmmm VirtualHostMonster should appear as on option in the "Select 
> Type to Add.. " popup in the ZMI.
>
> You can do a series of RewriteRules to handle the cases where you want 
> certain folders served by Apache and others by Zope. To get toe the 
> root of Zope, can you just skip Apache and go to ZServer directly? Or 
> you could make up a "fake" subdirectory, (e.g., zoperoot) like this 
> (names changed to protect innocent servers.. ):
>
> For this to work there must be a virtual host monster at the root of 
> Zope, and there must be no SiteRoot objects floating around.
>
> /icons and /pil are server by apache
> /zoperoot goes to the real zope root and
> /  goes to "myPortal"
>
> <VirtualHost x.y.z.w>
>
> Serveradmin spicklemire@uindy.edu
>
> ServerName foo.spvi.com
> ErrorLog /var/log/foo-error_log
> CustomLog /var/log/foo-access_log common
>
> RewriteEngine on
> #RewriteLog /var/log/rewrite.log
> #RewriteLogLevel 2
>
> Alias /icons/ "/usr/local/share/apache/icons/"
> Alias /pil/   "/usr/local/share/doc/PIL/handbook/"
>
> RewriteRule ^/icons - [l]
> RewriteRule ^/pil - [l]
> RewriteRule ^/zoperoot/(.*) 
> http://foo.spvi.com:10080/VirtualHostBase/http/foo.spvi.com:80/VirtualHostRoot/
> _vh_zoperoot/$1 [p]
> RewriteRule ^/(.*) 
> http://foo.spvi.com:10080/VirtualHostBase/http/foo.spvi.com:80/myPortal/VirtualHostRoot/
> $1 [p]
>
> </VirtualHost>
>
> I did just test this exact setup and it seems to work OK.
>
> Good Luck!
> -steve
>
> On Saturday, August 11, 2001, at 11:03 PM, waltonl wrote:
>
>> Thanks for sharing what the dogbowl uses, Tres. However, I'm very 
>> confused on whether you can use
>> siteAccess's SiteRoot and VirtualHostMonster both, or when you would 
>> use one versus the other.
>>
>> What I want is this: Apache w/ ZServer
>> my.domain.com  (which is an apache virtual host already) to go to 
>> either an apache served
>> index.html OR an zope served page - I don't care too much on that one.
>> my.domain.com/aCertainDirectory - served up by apache
>> my.domain.com/anotherCertainDirectory - served up by apache .... etc
>> my.domain.com/thisFolder - to really be content that is in my zope 
>> root under a folder containing
>> a CMFsite with id myPortal so the zope url is really like:
>>  /requiredPortalFolderThatCMFSiteObjectIsIn/myPortal/thisFolder
>> Likewise my.domain.com/anotherFolder to also map to
>> /requiredPortalFolderThatCMFSiteObjectIsIn/myPortal/anotherFolder
>>
>> But if I have something like
>> RewriteRule ^/(.*)
>> http://my.domain.com:8080/requiredPortalFolderThatCMFSiteObjectIsIn/myPortal/
>> $1 [P]
>> after my other RewriteRules that cause apache to serve up the 
>> directories I want served by
>> apache,
>> then the ZMI management screens also go straight to the myPortal and 
>> don't let me have access to
>> my zope root.
>>
>> I tried having a rule before the ^/(.*) one that rewrote ^/manage to 
>> just
>> http://my.domain.com:8080/$1 but that didn't work either as it still 
>> dumps me only in the portal
>> and not at my zope root..
>>
>> I'm frustrated because I thought I read somewhere that 
>> VirtualHostMonstor was part of SiteAccess
>> but I don't see it, and I don't see how to get a hold of it. A search 
>> for it only yields some
>> documents that talk about it, but none that tell where it is (at least 
>> none that I could find.)
>>
>> Would appreciate some guidance. Thanks,
>> Lynn
>