title: Multiple domains all incorrectly point to the same VirtualHost with Django WSGI
body: <p>I'm running Django using wsgi. I have two domains and one sub domain pointing to three seperate apache2 virtual hosts. For some (probably very obvious) reason each domain is landing to the same site (the first one that was put online using a2ensite). My configuration is as follows:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     ServerName www.one.com/
     ServerAlias one.com
     ServerAdmin andy@one.com
  
     DocumentRoot /srv/www/one.com/public_html
  
     &lt;Directory /srv/www/one.com/application&gt;
        Order allow,deny
        Allow from all
     &lt;/Directory&gt;
  
     WSGIDaemonProcess one.com processes=2 threads=15 display-name=%{GROUP}
     WSGIProcessGroup one.com
     WSGIScriptAlias / /srv/www/one/application/apache/one.wsgi
  
     Alias /robots.txt /srv/www/one.com/public_html/robots.txt
     Alias /favicon.ico /srv/www/one.com/public_html/favicon.ico
     Alias /media /srv/www/one.com/public_html/media
     Alias /static /srv/www/one.com/public_html/static
  
     ErrorLog /srv/www/one.com/logs/error.log
     CustomLog /srv/www/one.com/logs/access.log combined   
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>////// /// one.wsgi //////////</p>
  
  <pre><code>import os
  import sys
  
  sys.path.append('/srv/www/one.com/application')
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
  
  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>//////////////////</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     ServerName dev.one.co.uk/
     ServerAlias www.dev.one.co.uk/
     ServerAdmin andy@one.com
  
     DocumentRoot /srv/www/dev.one.com/public_html
  
  
     &lt;Directory /srv/www/dev.one.com/application&gt;
        Order allow,deny
        Allow from all
     &lt;/Directory&gt;
  
     WSGIScriptAlias / /srv/www/dev.one.com/application/apache/devone.wsgi
  
     Alias /robots.txt /srv/www/dev.one.com/public_html/robots.txt
     Alias /favicon.ico /srv/www/dev.one.com/public_html/favicon.ico
     Alias /media /srv/www/dev.one.com/public_html/media
     Alias /static /srv/www/dev.one.com/public_html/static
  
     ErrorLog /srv/www/dev.one.com/logs/error.log
     CustomLog /srv/www/dev.one.com/logs/access.log combined   
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>//////// devone.wsgi ///////////</p>
  
  <pre><code>import os
  import sys
  
  sys.path.append('/srv/www/dev.one.com/application')
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
  
  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>/////////////</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     ServerName dev.two.com/
     ServerAlias www.dev.two.com/
     ServerAdmin andy@two.com
  
     DocumentRoot /srv/www/dev.two.com/public_html
  
  
     &lt;Directory /srv/www/dev.two.com/application&gt;
        Order allow,deny
        Allow from all
     &lt;/Directory&gt;
  
     WSGIScriptAlias / /srv/www/dev.two.com/application/apache/devtwo.wsgi
  
     Alias /robots.txt /srv/www/dev.two.com/public_html/robots.txt
     Alias /favicon.ico /srv/www/dev.two.com/public_html/favicon.ico
     Alias /media /srv/www/dev.two.com/public_html/media
     Alias /static /srv/www/dev.two.com/public_html/static
  
     ErrorLog /srv/www/dev.two.com/logs/error.log
     CustomLog /srv/www/dev.two.com/logs/access.log combined   
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>//////// devtwo.wsgi /////</p>
  
  <pre><code>import os
  import sys
  
  sys.path.append('/srv/www/dev.two.com/application')
  
  os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
  
  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>The domains are all hitting my servers IP fine, but they all land on the same page. What am I missing? Thanks in advance!</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code>NameVirtualHost *:80
  </code></pre>
  
  <p>Is declared in ports.conf</p>