[Setup] Virtual Hosting Setup using VHM

Ricardo Newbery ric at digitalmarbles.com
Thu Dec 27 21:51:02 UTC 2007

On Dec 27, 2007, at 12:54 PM, ExacMan wrote:

> Hi.
> We're relatively new users of Zope 2.10.5 final, Python 2.4.4, and  
> Plone
> 3.0.4. After having reviewed most of the documentation related to the
> configuration, we decided to use VHM (virtual host monster) to  
> handle the
> virtual hosting of our main website to the /Plone instance, and  
> changed the
> zope.conf to reflect port 80.
> The difficulty now is that we cannot get to the admin without remoting
> directly to the webserver and connecting via http://localhost/ 
> manage. We
> want to be able to get to the Plone admin as well as the /Plone  
> instance
> without doing this (i.e. using a web browser).
> I know that in reading the support documents and other web  
> resources, that
> many people are using Apache instead, and also it is recommended to  
> expose
> the admin in a different way (and we're in particular not doing it  
> right),
> but I have found no coherent articles on how to accomplish this.  
> I've used
> this link for example to sort of show me how it works:
> http://www.insmallsteps.com/lessons/lesson-hosting-install/mapping- 
> the-virtual-host
> http://www.insmallsteps.com/lessons/lesson-hosting-install/mapping- 
> the-virtual-host
> but it go further on explaining how to set up the  
> admin.yourwebsite.com to
> work properly with VHM.
> Excuse the newbieness, but I very little familiarity with Plone/ 
> Zope so any
> help would be most appreciated. We're about to go live with our  
> site, and
> I'm proud to say we're very happy with Plone/Zope so far from a
> user-friendly standpoint.
> If additional information is needed, please let me know.
> Craig.

You can still use a bare-zope configuration to reach multiple virtual  
domains on your instance, including the zope root.  Just add another  
line to the VHM mappings.  An example:

www.example.com /Plone
www2.example.com /Plone2
zoperoot.example.com /

Of course, this example assumes you've set up the necessary DNS  
records for these domains.  This example is done with multiple  
subdomains but you can also do something like this with multiple  
ports instead.  Note, technically the third line above isn't strictly  
necessary as any domain not matched by a VHM rule will just default  
to using the zope root as the domain root.

In any case, it's true that many production installations use  
something like Apache in front to proxy the requests.  One advantage  
with an Apache-proxy is the ability to easily merge non-Plone web  
resources into the same domain space.  The most popular way to do  
this is again by leveraging VHM.  Read the instructions in the  
"about" tab in the VHM about using it's path-based negotiation.

Some more references:

Running Plone and Zope behind an Apache 2 web server

Mixing Local Apache and Proxyed Content

Setting up a Plone Proxy (IIS) on Windows

Installing Plone with Apache

Note, some of the instructions in these references aren't entirely  
accurate but they're mostly fine.  If you have any issues, feel free  
to ask again.


More information about the Setup mailing list