Hi there - sorry for the very long delay in between posts.
Firstly: I had followed your instructions and got my multi-website setup to work in my testing environment. I have yet to try it in a production environment, but I am sure it should work there too. Thanks for the speedy and concise help you have given thus far.
I did, however, have a few additional questions surrounding the workings of Apache and mod_wsgi, at the time that I read and implemented your suggestion (i.e. in early February). This is largely because while getting results from following advice is fine, I wanted to be sure I really understood what I was working with, and why things (such as particular configuration snippets) work the way they do. I could have asked vague and probably malformed questions at that time, but decided instead to spend some time studying systems programming and looking over Apache/mod_wsgi documentation in order to ask better questions, hence the long time delay between now and my previous post.
Now, regarding the distinction between "embedded mode" and "daemon mode", I take the main difference to consist in how the Python interpreter is executed from the perspective of the operating system. (I am aware that my setup is Windows and therefore supports only embedded mode - I am asking this more for understanding what I am working with rather than getting some specific thing to work.)
In "embedded mode", the Apache worker process has the Python interpreter running "inside of it" - perhaps as its own thread. (In other words, whatever the Apache worker natively does is one thread, and the Python interpreter is another.) Whereas in "daemon mode", the worker process requests the OS to spin up a new process that is reserved for the Python interpreter to run in (which will then presumably execute WSGI applications). In the case of "embedded mode", I am having some trouble understanding what it means for a Python interpreter to run inside of a (pre-existing) process, such as an Apache worker. It may also be worth mentioning that the details of what exactly is involved with an Apache worker process and what it does is still opaque to me at the moment.
The above confusion is related to my next question. In the mod_wsgi documentation (and in other places such as PEP 684), there are mentions of "sub-interpreters", which I am also having trouble conceptualising, even after reading resources about it online. What does it mean for a single process to host multiple sub-interpreters? (This is really what I want to understand for my own setup.) Are these sub-interpreters instantiated as threads within the process - i.e. each sub-interpreter is its own thread? If so, what within the process is coordinating these various threads (i.e. sub-interpreters), and what exactly is shared between these sub-interpreters?
I am making the assumption of viewing this purely from the perspective of the operating system (and not from, say, the programmer working on a WSGI application). Hence I assume that the only thing that really exists are the processes that are defined by the OS. Consequently, how programs are threaded, and the logic of how threads are coordinated, is left to the logic of the various programs running inside of the process.
To relate an
infographic on sub-interpreters that added to my confusion, here it shows what is presumably a single process used to run multiple Python sub-interpreters. The language suggests that each sub-interpreter can host multiple threads, but that each sub-interpreter is itself somehow not a thread (despite presumably belonging to the same process, which hosts the global state storage that all sub-interpreters share). Additionally, I am unclear on what the relation is between the main interpreter and subsequently-spawned sub-interpreters, along with how the process coordinates between these interpreters; I am assuming that, possibly, the main interpreter does the work of coordinating between which sub-interpreters run at which time (e.g. after exhausting their allotted quanta).
The main point is that I am used to associating a Python interpreter with a process (e.g. seeing "python.exe" show up in the list of processes). I am neither familiar with the notion of what it means to run the interpreter inside of another pre-existing process (that's already running something else, like an Apache worker), nor what it means for a process to contain sub-interpreters. If any of my questions/concerns are unclear, I can try to rephrase them better.