diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-07-04 16:04:34 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-07-04 16:04:34 +0000 |
| commit | 6c7d9a79a57064ea93829b5a84e6614c33a4f0ed (patch) | |
| tree | 6c0216d21cf2c486472a64c724f8bb37e77e8c49 /docs/narr/vhosting.rst | |
| parent | 19c70dc3c5b5e9567e3512a5481c5e711cbf2996 (diff) | |
| download | pyramid-6c7d9a79a57064ea93829b5a84e6614c33a4f0ed.tar.gz pyramid-6c7d9a79a57064ea93829b5a84e6614c33a4f0ed.tar.bz2 pyramid-6c7d9a79a57064ea93829b5a84e6614c33a4f0ed.zip | |
Wording changes.
Diffstat (limited to 'docs/narr/vhosting.rst')
| -rw-r--r-- | docs/narr/vhosting.rst | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/narr/vhosting.rst b/docs/narr/vhosting.rst index 14b9a2199..4546446be 100644 --- a/docs/narr/vhosting.rst +++ b/docs/narr/vhosting.rst @@ -57,14 +57,16 @@ Virtual root support is useful when you'd like to host some model in a 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 ``repoze.bfg.url.model_url`` API will generate the -"correct" virtually-rooted URLs. +``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 +``repoze.bfg.url.model_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 |
