I have the following httpd.conf. Based on the different domain, it should route the request to the appropriate entry showing a different site based on a similar code base.
The problem is that it swaps between site 1 and site 2 every few requests:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.mysite1.com
ServerAlias mysite1.com
DocumentRoot /var/www/html/mysitedjango
WSGIScriptAlias / /var/www/html/mysitedjango/mysite1/mysite1_wsgi.py
</VirtualHost>
<VirtualHost *:80>
ServerName www.mysite2.com
ServerAlias mysite2.com
DocumentRoot /var/www/html/mysitedjango
WSGIScriptAlias / /var/www/html/mysitedjango/mysite1/mysite2_wsgi.py
</VirtualHost>
Alias /static/ /var/www/html/mysitedjango/shared/static/
<Directory /var/www/html/mysitedjango/shared/static/>
Order deny,allow
Allow from all
</Directory>
WSGIPythonPath /var/www/html/mysitedjango
<Directory /var/www/html/mysitedjango>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
Is there something I can do to stop this confusion from happening?
NameVirtualHost *:80
entry? You will need that to enable name based virtual hosting.NameVirtualHost *:80
in your Apache configuration file. Do you have that line?