[Zope] VirtualHostMonster w/ ZServer

Evan Simpson evan@4-am.com
Wed, 7 Feb 2001 19:16:25 -0500


From: "Walter Miller" <wmiller@macromedia.com>
> If I understand your example properly, when someone types in www.foo.com,
> the Access Rule I have in the root directory uses the Python script to
send
> requests to the /vhosts/foo directory.

Exactly.

> Now, the second part of the equation is to put the VHM in the directory
you
> want to be the root

In the Zope root, actually. The "VirtualHostRoot" path element selects the
virtual root.

> so all objects in that directory return logical path of
> / instead of their true physical path.
>
> The one question I have is regarding the naming convention of the VHM.  It
> doesn't seem to matter what the name/ID of the VHM is as long as
> "VirtualHostRoot" is used in the requesting URL.  Likewise, you can change
> "VirtualHostRoot" in the requesting URL to something else like "testVHM"
and
> as long as the VHM is called "testVHM", it works.

True, and true.

> Is there a preferred naming convention?

Only if you prefer one.  Using "VirtualHostRoot" has the minor benefit that
if you ever rename the VHM, you don't have to change your paths.

Cheers,

Evan @ digicool & 4-am