repoze.vhm provides middleware and utilities for doing virtual hosting within a WSGI/Repoze environment. It is particularly useful within a repoze.zope2 environment, where it may be used as an alternative to the classic VirtualHostMonster: method of doing virtual hosting.
Virtual Hosting in a Nutshell
"Virtual hosting" enables dynamic applications to be served from within a larger URL namespace, independent of the physical location of the script files used to serve the application, or the precise layout of objects within the application. In particular, the application and the server collaborate to generate URLs for links in the application, such that the links preserve the "apparent" location of the application.
The simplest case requires no effort at all: links rendered as relative paths from within pages work nicely. However, such links begin to be problematic quickly, e.g. when the page is serving as the default index view for its folder, and the URL does not end in a /. In that case, the browser interprets the links relative to the folder's parent, and chaos ensues.
What's New in This Release: [ read full changelog ]
· Ensure HTTP_HOST is set correctly for non-standard ports under VHM paths. This header requires a trailing port if not the default for a given service. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23. [davidjb]