diff options
Diffstat (limited to 'docs/narr/vhosting.rst')
| -rw-r--r-- | docs/narr/vhosting.rst | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/docs/narr/vhosting.rst b/docs/narr/vhosting.rst index d1fd1b382..65168806e 100644 --- a/docs/narr/vhosting.rst +++ b/docs/narr/vhosting.rst @@ -85,21 +85,19 @@ Virtual Root Support :term:`traversal` -based (but not :term:`URL dispatch` -based) applications. -Virtual root support is useful when you'd like to host some model in a -:app:`Pyramid` object graph as an application under a URL pathname -that does not include the model path itself. For example, you might -want to serve the object at the traversal path ``/cms`` as an -application reachable via ``http://example.com/`` (as opposed to -``http://example.com/cms``). - -To specify a virtual root, cause an environment variable to be -inserted into the WSGI environ named ``HTTP_X_VHM_ROOT`` with a value -that is the absolute pathname to the model object in the traversal -graph that should behave as the "root" model. As a result, the -traversal machinery will respect this value during traversal -(prepending it to the PATH_INFO before traversal starts), and the -:func:`pyramid.url.model_url` API will generate the "correct" -virtually-rooted URLs. +Virtual root support is useful when you'd like to host some resource in a +:app:`Pyramid` resource tree as an application under a URL pathname that does +not include the resource path itself. For example, you might want to serve the +object at the traversal path ``/cms`` as an application reachable via +``http://example.com/`` (as opposed to ``http://example.com/cms``). + +To specify a virtual root, cause an environment variable to be inserted into +the WSGI environ named ``HTTP_X_VHM_ROOT`` with a value that is the absolute +pathname to the resource object in the resource tree that should behave as +the "root" resource. As a result, the traversal machinery will respect this +value during traversal (prepending it to the PATH_INFO before traversal +starts), and the :func:`pyramid.url.resource_url` API will generate the +"correct" virtually-rooted URLs. An example of an Apache ``mod_proxy`` configuration that will host the ``/cms`` subobject as ``http://www.example.com/`` using this facility |
