On Mar 5, 2011, at 11:38 AM, Haros wrote: > > I know that this question has been posted a couple of times in this > group but it seems that there is no answer yet... > > I have web2py installed with apache via wsgi. Everything works fine. > > Instead of having multiple web2py instances, I want each domain to > point to a different application inside the same web2py instance. > > For example domain1.com will be app1, domain2.com will be app2 etc. > > I know that this can be done with routes, but If someone has many > applications (performance-wise) it is better to be done with apache's > virtual hosts. > > So, can anyone please provide an example apache config script?
I cannot. However, since you're already using wsgi, if I were you, I'd at least look at configuring wsgi.multiprocess. I don't have any experience with it, but I don't see offhand why you wouldn't get good performance (and in particular effective use of multiple cores) with that. If you *do* use routes, the current version gives you syntax like this to handle the domain mapping: routers = dict( BASE = dict( domains = { "domain1.com" : "app1", "www.domain1.com" : "app1", "domain2.com" : "app2", }, ), ) Letting Apache serve static files directly is also a good idea, of course.