[Web-SIG] WSGI deployment use case

Ian Bicking ianb at colorstudy.com
Tue Jul 26 05:01:53 CEST 2005


Chris McDonough wrote:
> How much of this could be solved by using a web server's
> directory/alias-mapping facility?
> 
> For instance, if you needed a single Apache webserver to support
> multiple pipelines based on URL mapping, wouldn't it be possible in many
> cases to compose that out of things like rewrite rules and script
> aliases (the below assumes running them just as CGI scripts, obviously
> it would be different with something using mod_python or what-have-you):
> 
> <VirtualHost *:80>
>  ServerAdmin webmaster at plope.com
>  ServerName plope.com
>  ServerAlias plope.com
>  ScriptAlias /viewcvs "/home/chrism/viewcvs.wsgi"
>  ScriptAlias /blog "/home/chrism/blog.wsgi"
>  RewriteEngine On
>  RewriteRule ^/[^/]viewcvs*$ /home/chrism/viewcvs.wsgi [PT]
>  RewriteRule ^/[^/]blog*$ /home/chrism/blog.wsgi [PT]
> </VirtualHost>
> 
> Obviously it would mean some repetition in "wsgi" files if you needed to
> repeat parts of a pipeline for each URL mapping.  But it does mean we
> wouldn't need to invent more software.

No, we already have templating languages to generate those configuration 
files so it's no problem ;)

Messy configuration files (and RewriteRule for that matter) are my bane.

To be fair, in a shared hosting situation (websites maintained by 
customers, not the host) this would seem more workable than a 
centralized configuration.  Perhaps... it's not the kind of situation I 
deal with much anymore, so I've lost touch with that case.  And would 
that mean we'd start seeing ".wsgi" in URLs?  Hrm.

-- 
Ian Bicking  /  ianb at colorstudy.com  / http://blog.ianbicking.org


More information about the Web-SIG mailing list