Might there already be a way to have per process group PYTHONHOME
settings?

And/or, please tell me that/why it wouldn't help.

My purpose is to have several separate Django instances,
each serving in a separate VirtualHost, and each using a
separate virtualenv, all be run from a single apache.

We are currently running 5 servers, a front end which does
the virtual hosting, proxying to the other four separate apaches
(same executable, separate configuration files, so linked against
the same libpython.so).

I was very pleased to discover the WSGIPythonHome directive
recently, since now my sys.path looks correct (and my .wsgi
scripts are much simpler).

My understanding of WSGIDaemonProcess is that it spawns a
separate process in which to run python interpreters, and the root
apache, then proxys for them.  Further, I hope that if I put them in
separate WSGIProcessGroup, that I can arrange to have traffic for
a particular VirtualHost served by a particular process group (by
putting the WSGIScriptAlias, the WSGIDaemonProcess, and the
WSGIProcessGroup directives all within the VirtualHost element?).

If all this is true, and if the python interpreter hasn't already been
started by the time the daemon processes are forked, then it
would be very nice to be able to set the PYTHONHOME env
according to which VirtualHost's WSGIScriptAlias will use the
daemon process (group).

I did start to play with WSGIPythonHome, but discovered that it
is not allowed inside of a VirtualHost.  Similarly, while there is a
python-path= option for WSGIDaemonProcess, there is not one
called, for example, python-home= .

So:
  1. Would this scheme work if I could set PYTHONHOME per
daemon process group?
  2. Is there already a way to do this?
  3. Would adding a python-home= WSGIDaemonProcess option
requre major refactoring?
  4. Is this a bad idea even if possible?

Thanks, Bill

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to