This answer assumes that you want to have two domain names, each of which runs separate Django projects, but is hosted on the same Apache server. If this is not the case, clarify your question!
First, you will need two VirtualHost entries in your apache conf (call domain1.co.uk and domain2.co.uk )
# Virtual hosts setup NameVirtualHost * <VirtualHost *> ServerName domain1.co.uk WSGIDaemonProcess APPLICATION_NAME processes=5 python-path=/opt/django/project/domain1:/home/USERNAME/webapps/APPLICATION_NAME/lib/python2.6 threads=1 WSGIScriptAlias / /opt/django/project/domain1/domain1.wsgi </VirtualHost> <VirtualHost *> ServerName domain2.co.uk WSGIDaemonProcess APPLICATION_NAME_www processes=5 python-path=/opt/django/project/domain2:/home/USERNAME/webapps/APPLICATION_NAME/lib/python2.6 threads=1 WSGIScriptAlias / /opt/django/project/domain2/domain2.wsgi </VirtualHost>
You will also need two wsgi files (two pointers in conf above)
/opt/django/project/domain1/domain1.wsgi /opt/django/project/domain1/domain2.wsgi
and will look something like
import os import sys from django.core.handlers.wsgi import WSGIHandler os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
In settings.py make sure that both settings files have the difference SITE_ID = 1 or SITE_ID = 2 and point to the correct urls.py
ROOT_URLCONF = 'urls'
or
ROOT_URLCONF = 'domain1_urls'
Most of this question was gained from personal experience and this blog . Your project directories and domain names seem a bit confusing, I did my best to put them in the right places here, but you will need to adapt to your own goals.
Additional
If you have two sites running from the same server, you must be very careful to maintain consistency over project directories, static file directories and settings files, etc. From your question, you say that your settings files are /opt/django/project/settings.py and /opt/django/project/domain1_settings.py This is pretty confusing as it seems that you have one project directory ( /opt/django/project ). I would strongly recommend a stronger separation; as I described above, possibly installing your projects ( domain1 and domain2 ) in directories
/opt/django/project/domain1/ /opt/django/project/domain2/
with corresponding settings files
/opt/django/project/domain1/settings.py /opt/django/project/domain2/settings.py
etc .. This should make it easier to determine what is going wrong.