Ah. Very nice.
Now, as this has become a telltale thread about the so-called 'LAMP-stack', I might share my own experiences as well.
It began with
this discussion, and then I decided to, well, just do it.
And, btw, to do away with that 'LAMP-stack'. I don't want my Apache to be spammed with dozens of foreign plugins - there's now php plugins, python plugins, phusion passenger plugins, authentication plugins, evasive actions plugins, fcgi- scgi- wsgi- and whatever-gi else plugins, and sooner or later that must end in problems.
So I followed the idea to run the application as a freestanding and self-maintained process, NOT plugged into the webserver. That way the application becomes completely independent from the webserver. That way any webserver can be used, or even multiple ones at the same time, because the Webserver acts now merely as a reverse-proxy and SSL endpoint.
There may be a performance penalty, but then there is also a big advantage: since the communication between webserver and application is now pure TCP, one can at any time look into that communication with tcpdump and see what is actually happening. Memory issues can also be clearly attributed to the respective offender.
With the python stuff which was originally concerned, this is a supported configuration. Then I found that it also works with php/ZEND applications. It even works with my Ruby-on-Rails applications.
Then, as I was already doing it, I decided to do it quite right, and also implement single-sign-on.
Single-sign-on means, the user logs onto their respective gadget and thereby obtains some credentials. The web browser which they use must then pick up those credentials, and transfer them to the webserver. The webserver passes them thru to the application server. The application server evaluates those credentials and then hands them to the application - which might then do whatever it seems fit.
That way there is no more need for those annoying logon-screens on each and every web application, and there is no need to have a user administration in each of them.
All that is now implemented and appears to work, but, although this is not a bug (but on the way I found and fixed about twenty bugs in various components, which urges the conclusion that nobody has done it that way before), as usual, nobody is interested in it. Well then, at least my machines work the way I like it.