[mod_python] Managing multiple users with mod-python

Matt Goodall matt at pollenation.net
Wed Dec 10 18:31:16 EST 2003


> Marco Catellani wrote:
>
>> Hi,
>> I'm experienced with Python and I'm learning to configure and use Mod 
>> Python (rel 3.03) and Apache (rel 2).
>> I'm setting up on my server a test environment, and I would like to 
>> manage multiple users, everyone of them using a different python 
>> interpreter.
>> Every programmer in my test environment should work with its own user 
>> and the python programs launched by him should run under his user and 
>> should not interfere with other user's processes.
>> Apache supports only one user for all child processes, so I'm not 
>> able to launch multiple interpreters with different users. Does Mod 
>> Python offers any feature to satisfy my need? 
>
Assuming you don't need the tight coupling Apache+mod_python provides ...

You may want to look at something like SCGI for development instead of 
mod_python. You would assign each user an SCGI port number (Bob uses 
3000, Dave uses 3001 etc) and then configure Apache so that each user 
has a virtual host or URL path on the web server which forwards requests 
to the user's SCGI process. Your users can then develop, start and stop 
the web app from somewhere within their home directory, without ever 
needing to touch Apache.

There are quite a few web frameworks which work behind either SCGI or 
mod_python so moving from SCGI during development to mod_python for 
production (if that's what you decide to do) should be relatively painless.

    SCGI - http://www.mems-exchange.org/software/scgi/

Another interesting solution to your problem, although nothing to do 
with Apache or mod_python, is Twisted's spreadable web servers. See 
http://www.twistedmatrix.com/documents/howto/using-twistedweb#auto19 for 
more. It's worth pointing out that the personal servers can be any 
Twisted-based web application and not just something that serves content 
from the file system.

Hope this helps.

Cheers, Matt

-- 
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenationinternet.com
e: matt at pollenation.net




More information about the Mod_python mailing list