Do you have appropriate NameVirtualHost directive anywhere in your Apache configuration? This must match pattern used by VirtualHost definitions. You would also normally use '*:80' and not just '*'. Thus:
NameVirtualHost *:80 <VirtualHost *:80> .. </VirtualHost> <VirtualHost *:80> .. </VirtualHost> Graham On Feb 9, 11:57 am, WeissBlitz <weissbl...@yahoo.com> wrote: > Hello all! > > I setup an Ubuntu Server 9.04 running Apache c2.2.11 and Django v1.2. > > I basically have two sites installed using WSGI. > While under development I'm using the following domain names for the > sites: > articlehub.dnsalias.com and jobsbot.gotdns.com, both pointing to my > home IP. > > So I created 2 Apache VirtualServers, one for each. > The first site (articlehub.dnsalias.com) shows fine in the browser > (Firefox). > But then enter the jobsbot.dyndns.com, I get the first site > (articlehub.dnsalias.com) instead. > I suspect something on my Apache virtual server or my WSGI setup is > not right and Apache > only see the first website. > > The first site settings are as follows: > > Location: /usr/local/djangosites/articlehub > > Apache config file (etc/apache2/sites-available/dnsalias.com.conf): > <VirtualHost *> > ServerName articlehub.dnsalias.com > > WSGIScriptAlias / /usr/local/djangosites/articlehub/apache/django.wsgi > WSGIProcessGroup articlehub > WSGIDaemonProcess articlehub user=www-data group=www-data threads=25 > > <Directory /usr/local/djangosites/articlehub/apache> > Order deny,allow > Allow from all > </Directory> > > Alias /static/ "/usr/local/djangosites/articlehub/static/" > <Directory /usr/local/djangosites/articlehub/static> > SetHandler None > </Directory> > > Alias /admin/media/ "/var/lib/python-support/python2.6/django/contrib/ > admin/media/" > Alias /media/ "/var/lib/python-support/python2.6/django/contrib/admin/ > media/" > > <Directory "/var/lib/python-support/python2.6/django/contrib/admin/ > media"> > Order allow,deny > Allow from all > </Directory> > > LogLevel notice > ErrorLog /usr/local/djangosites/articlehub/logs/error.log > CustomLog /usr/local/djangosites/articlehub/logs/access.log "combined" > </VirtualHost> > > The /usr/local/djangosites/articlehub/apache/django.wsgi is as > follows: > > import os > import sys > > sys.path.insert(0, '/usr/local/djangosites') > sys.path.insert(0, '/usr/local/djangosites/articlehub') > > os.environ['DJANGO_SETTINGS_MODULE'] = 'articlehub.settings' > > # redirect sys.stdout to sys.stderr for bad libraries like geopy that > uses > # print statements for optional import exceptions. > sys.stdout = sys.stderr > > from django.core.handlers.wsgi import WSGIHandler > application = WSGIHandler() > > ===== > > Now the second site Apache virtual host file is (etc/apache2/sites- > available/gotdns.com.conf): > <VirtualHost *> > ServerName jobsbot.gotdns.com > > WSGIScriptAlias / /usr/local/djangosites/jobsbot/apache/django.wsgi > WSGIProcessGroup jobsbot > WSGIDaemonProcess jobsbot user=www-data group=www-data threads=25 > > <Directory /usr/local/djangosites/jobsbot/apache> > Order deny,allow > Allow from all > </Directory> > > Alias /static/ "/usr/local/djangosites/jobsbot/static/" > <Directory /usr/local/djangosites/jobsbot/static> > SetHandler None > </Directory> > > Alias /admin/media/ "/var/lib/python-support/python2.6/django/contrib/ > admin/media/" > Alias /media/ "/var/lib/python-support/python2.6/django/contrib/admin/ > media/" > > <Directory "/var/lib/python-support/python2.6/django/contrib/admin/ > media"> > Order allow,deny > Allow from all > </Directory> > > LogLevel notice > ErrorLog /usr/local/djangosites/jobsbot/logs/error.log > CustomLog /usr/local/djangosites/jobsbot/logs/access.log "combined" > </VirtualHost> > > And WSGI script reads (usr/local/djangosites/jobsbot/apache/ > django.wsgi): > > import os > import sys > > sys.path.insert(0, '/usr/local/djangosites') > sys.path.insert(0, '/usr/local/djangosites/jobsbot') > > #sys.path.insert(0, '/home/www/freearticlerepository.com') > #sys.path.insert(0, '/home/www/freearticlerepository.com/articlehub') > > os.environ['DJANGO_SETTINGS_MODULE'] = 'jobsbot.settings' > > # redirect sys.stdout to sys.stderr for bad libraries like geopy that > uses > # print statements for optional import exceptions. > sys.stdout = sys.stderr > > from django.core.handlers.wsgi import WSGIHandler > application = WSGIHandler() > > Please let me know if you need any additional setup information. > I would greatly appreciate if somebody could point me up to what the > problem is. > > Thanks in advance, > Carlos -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.