I've 3 django projects with various configurations, 2 underneath the subdomains parents.abc.com,teachers.abc.com and abc.com. All of them belong to a shared apache instance. Here's my httpd configuration file:

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/user/logs/user/access_django.log combined
ErrorLog /home/user/logs/user/error_django.log
KeepAlive Off
Listen 37049
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess django processes=5 python-path=/home/user/webapps/django:/home/user/webapps/django/lib/python2.6 threads=1
WSGIPythonPath /home/user/webapps/django:/home/user/webapps/django/lib/python2.6
NameVirtualHost *:37049

<VirtualHost *:37049>
        WSGIScriptAlias / /home/user/webapps/django/abc.wsgi
        ServerName abc.com
        ServerAlias abc.com
</VirtualHost>
<VirtualHost *:37049>
        WSGIScriptAlias / /home/user/webapps/django/parents.wsgi
        ServerAlias parents.abc.com
</VirtualHost>

<VirtualHost *:37049>
        WSGIScriptAlias / /home/user/webapps/django/teachers.wsgi
        ServerAlias teachers.abc.com
</VirtualHost>

My problem comes (following a restart) basically visit parents.abc.com, then instructors.abc.com (or the other way around), I'll encounter url error within the second since it appears enjoy it is referencing the web addresses.py for that first project. i.e instructors.abc.com is searching in the configurations apply for parents.abc.com (the other way around).

Can anybody shed some light about this?

I want to specify the server title in every vhost

Include:

ServerName parents.abc.com

and:

ServerName teachers.abc.com

ServerAlias, so far as I understand, alone isn't enough to define a title based virtual host.