We're hosting two sites and don't have a domain name at the moment so we're using the IP address. I want the two sites to be accessed in the following manner:
Site1 is a small About us type site. Site2 is a Django-based file upload site.
Here's my httpd.conf file:
WSGIPythonPath /var/www/Site2/src/site Listen 80 NameVirtualHost *:80 # Site1 <VirtualHost *:80> ServerName Site1 DocumentRoot /var/www/Site1 </VirtualHost> # Site2 <VirtualHost *:80> ServerName Site2 WSGIScriptAlias /Site2 /var/www/Site2/src/site/wsgi.py <Directory /var/www/Site2/src/site> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> Alias /static/ /var/www/Site2/src/site/static/ <Directory /var/www/Site2/src/site/static> Order deny,allow Allow from all </Directory> <Location /var/www/Site2/src/site/static/> AuthType Basic AuthName "site" AuthBasicProvider wsgi WSGIAuthUserScript /usr/local/wsgi/scripts/auth.wsgi Require valid-user </Location> </VirtualHost>
184.108.40.206/Site1 works fine. Visiting 220.127.116.11/Site2 only yields the Index of /Site2 page.
If I re-order the VirtualHost declarations then Site2 works, but Site1 does not.
Am I missing something incredibly crucial?
I've seen this problem crop up on a number of search results and forums but I haven't yet found a solution.