pyramid, apache, virtual hosting

I was on the lookout for the good old ++vh++ ZTK virtual hosting solution for Pyramid.
This is the opposite of the X-Vhm-Root mode.

Turned out to be a bit complicated.

The simplified solution is:


use = egg:PasteDeploy#prefix

pipeline =
apache config:

    ServerName ops.acme.org
    DocumentRoot d:/wwwroot/empty

    RewriteEngine on
    RequestHeader set X-FORWARDED-SCHEME https

    <Location /sv1>
        RequestHeader set X-FORWARDED-HOST ops.acme.org/sv1
    RewriteRule ^/sv1/(.*)$1 [P,L]
    <Location /sv2>
        RequestHeader set X-FORWARDED-HOST ops.acme.org/sv2
    RewriteRule ^/sv2/(.*)$1 [P,L]

1 comment:

Anna Schafer said...

Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. health-journal.hu