title: Two Django projects running simultaneously and mod_wsgi acting werid
body: <p>I'm trying to run two Django projects simultaneously. I happened to be using mod_wsgi, and found the site is acting weird. Perhaps there would be a workaround, but I'd like to know what I'm missing and how to solve the problem.</p>
  
  <p>In the apache configuration</p>
  
  <pre><code># Setup the Python environment
  # As root owns basically everything on a Amazon AMI and root
  # cannot be used. Create a folder under /var/run/wsgi
  # with the owner as ec2-user and group ec2-user.
  WSGISocketPrefix /var/run/wsgi
  # Call your daemon process a name
  WSGIDaemonProcess pydaemon processes=1 threads=5
  # Call your daemon process group a name
  WSGIProcessGroup pydaemon
  # Point to where the handler file is. This will be different
  # If you are using some other framework.
  WSGIScriptAlias /test /var/www/html/test/wsgi.py
  WSGIScriptAlias /proto /var/www/html/proto/wsgi.py
  </code></pre>
  
  <p>After Apache restarts, if I connect to '/proto', then the proto site is shown. However, then I connect to '/test', without restarting Apache, the proto site is still shown, and I cannot access to the test site.</p>
  
  <p>Now I restart Apache, this time I go to '/test' first. The test site comes up! However, if I go to '/proto' it still shows the test site, not the proto site.</p>
  
  <p>What could make this happen? I added SESSION_COOKIE_PATH differently for each application just in case, but the problem still exists.</p>
  
  <hr>
  
  <p>[UPDATED]</p>
  
  <p>I also tried as the following, to give different WSGI application group names, but without luck.</p>
  
  <pre><code>Alias /cuedit /var/local/test/wsgi.py
  &lt;Location /test&gt;
  SetHandler wsgi-script
  Options +ExecCGI
  WSGIApplicationGroup test
  &lt;/Location&gt;
  Alias /proto /var/local/proto/wsgi.py
  &lt;Location /proto&gt;
  SetHandler wsgi-script
  Options +ExecCGI
  WSGIApplicationGroup proto
  &lt;/Location&gt;
  </code></pre>
  
  <hr>
  
  <p>[UPDATED]</p>
  
  <p>I changed from the daemon mode to the embedded mode. I guess the problem was two instances shared the same mod_wsgi daemon process so their namespace collide.</p>
  
  <p>I would expect they should be handled correctly, but in the daemon mode I couldn't get it right. </p>