eleith wrote:
> i've got a domain: example.com
> 
> i want to run ten different websites (sub1.example.com,
> sub2.example.com .... sub10.example.com)
> 
> a different pylons app will be running each of the 10 websites
> 
> i'm proxying scgi from lighttpd (10 entries, each website running on
> port 5001, 5002 ... 5010)
> 
> i have a script that can start all 10 pasters on bootup
> 
> so, if i wanted to add an 11th website, i would
> 
> 1) use up another port, 5011
> 2) add another proxy within lighttpd
> 3) modify my paster shell to start up yet another paster server on
> bootup
> 
> is there a better way to go about this, so this scales better and can
> be easier to maintain? taking up another port, starting up yet another
> paster process seem like it can get a bit too resource intensive if
> all i want to do is just to run different websites (virtual hosts)

You can use urlmap if you want, and host all the sites in the same 
Python instance.  urlmap can do domain-based dispatch, like:

[composite:main]
use = egg:Paste#urlmap
domain sub1.example.com / = config:sub1.ini
domain sub2.example.com / = config:sub2.ini

and so on, and each config file is like development.ini


It's a little experimental, but there's a process dispatcher in 
wsgiproxy.spawn.  It doesn't integrate with Paste Deploy, though it 
would be a nice bit of glue if it did (it'd be a matter of automatically 
starting an HTTP server serving a config file, with a PasteDeploy#prefix 
wrapper, and ports configured by the spawner itself).

Of course you can also do ad hoc dispatch on your own, it's not too hard 
really.


-- 
Ian Bicking : [email protected] : http://blog.ianbicking.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to