Personal tools
You are here: Home Documentation How-tos Virtual Hosting serveral sites under Windows
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Virtual Hosting serveral sites under Windows

This How-to applies to: Any version.
This How-to is intended for: Server Administrators

This howto explains how to use the VirtualHostMonster to host several sites under Windows.

It is really quite easy to use the built in (Zope) function VHM - Virtual Host Monster - to set up a vanilla (windows, using standard plone installer) installation to serve out different sites. There is one trick that might drive you mad before you know it.

This applies only if:

  • you're using Windows
  • you're not using Apache or some other front-end webserver

So:

  • Install Plone if you havent already
  • Add and set up plone site from the ZMI (you use the drop down from the root)
  • Add a VHM in the ZMI root, using the add dropdown. Must be in the root. Name does not matter.
  • Click the new VHM node in the root that you just created, read instructions on the first tab. Re-read until you go nuts. Then choose the other (mappings) and enter the mappings: Really, if you have a domain mydomain.com and you created a Plone site in the ZMI root with the name mydomain you need to put an entry mydomain.com/mydomain. If you want to have it answer to www. you also need an entry for that (ie www.mydomain.com/mydomain).
  • Here is the trick: We are NOT done! Save the mappings and then go to the plone installation catalog on your harddrive, into the directory Plone 2\Data\Products\CMFPlone\Extensions. There you will find a file accessRule.py with some instructions. Follow them or do what i did, replace the last three lines with some null statement (like pass):
      def accessRule(self, *args):
          pass
    
  • Restart Zope from the ZMI control panel and everything should work.
by mawi — last modified February 5, 2006 - 00:11 All content is copyright Plone Foundation and the individual contributors.

accessRule.py

Posted by Dale DeWitt at September 5, 2006 - 14:35
First off there are more than three lines at the bottom of the accessFile.py to erase and substitute with pass. Erasing all 4 lines and substituting with pass results in the URL directing to the zope quick start page for both URLs. Dragging and dropping the original accessRule.py back restores everything as normal, whereas in my case the secondary URL directs to the primary no matter what I do.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by