Question on multiple python environments in Apache

Steve Holden steve at holdenweb.com
Mon Oct 25 11:28:54 EDT 2010


On 10/25/2010 10:50 AM, Jeffrey Gaynor wrote:
> Because that is a mess to manage, involving hacking the Apache source
> and multiple recompiles (this will have to run under CentOS). Using
> Python should be easy and not entail multiple compiles of other
> people's software. My main question boils down to the best way to get
> mutltiples interpreters running at a time or, failing that, a way to
> get separate threads.
> 
> Is there an *easy* way to do this with virtualenv or virtual hosts
> under Apache?
> 
I fail to see why you have to recompile Apache to be able to run
multiple instances. I wonder if anyone has told Web Faction, who
typically run a separate instance of Apache for each web site run by
each of the many users who share one of their virtual hosts.

As far as I can see each of my web sites uses a bog standard Apache
server process with output on a specific TCP port, which is then
consumed by a front-end server process that forwards to individual
Apache instances according to what it sees in the request's Host: header.

Is it possible you misunderstood the advice?

regards
 Steve

> ----- Original Message ----- From: "Mario Miri"
> <mario.miri at gmail.com> To: "python-list" <python-list at python.org> 
> Sent: Monday, October 25, 2010 2:50:55 AM Subject: Re: Question on
> multiple python environments in Apache
> 
> 
> Why wouldn't you use multiple apache instances?
> 
> 
> On Fri, Oct 22, 2010 at 11:28 PM, Jeffrey Gaynor <
> jgaynor at ncsa.uiuc.edu > wrote:
> 
> 
> I have several different versions of a web app that run under Apache.
> The issue is that I need to have several different configurations
> available under several environments (such as Django, mod_python and
> plain vanilla mod_wsgi). Is there a simple way to get several of
> these to be completely independent? I thought about virtualenv, but
> it seems that I can only get one virtual environment for the entire
> server (so this just keeps it distinct from my main python install),
> rather than half a dozen. These will be on a dedicated test server so
> performance is not an issue.
> 
> Does anyone know of a good FAQ that discusses this?
> 
> Thanks in advance,
> 
> Jeff


-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon 2011 Atlanta March 9-17       http://us.pycon.org/
See Python Video!       http://python.mirocommunity.org/
Holden Web LLC                 http://www.holdenweb.com/




More information about the Python-list mailing list