title: Django + Apache - wsgi trouble
body: <p>I've been working with Django locally and now I'm trying to push some code to a production Apache environment on an Ubuntu server I have running (<a href="http://www.youtube.com/watch?v=hBMVVruB9Vs" rel="nofollow">http://www.youtube.com/watch?v=hBMVVruB9Vs</a>). </p>
  
  <p>However, I just get a list of files in the directory and nothing else. First of all I ensured that Python was install by running the command Python at the terminal. </p>
  
  <p>I've installed apaache and mod wsgi with the following commands: </p>
  
  <p>sudo apt-get install apache2
  sudo apt-get install libapache2-mod-wsgi</p>
  
  <p>And I've tested to see that its enabled. </p>
  
  <p>Here is my wsgi file firstweb.wsgi which is located in root:</p>
  
  <pre><code>import os
  import sys
  sys.path.append('/var/www/firstweb')
  os.environ['DJANGO_SETTINGS_MODULE'] = 'firstweb.settings'
  
  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>Here is my firstweb.conf file: </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
  WSGIScriptAlias / /firstweb.wsgi
  
  Alias /static /var/www/firstweb/static 
  
  &lt;Directory /var/www/firstweb/&gt;
  Order allow,deny
  Allow from all 
  &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and my Django project is located in: /var/www/firstweb/</p>
  
  <p>I honestly can't work out what is wrong here, within the video it is running fine! :(</p>
  
  <p>Edit, here is error log: </p>
  
  <pre><code>[Sat Feb 16 16:19:31 2013] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
  [Sat Feb 16 16:20:46 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 16:20:47 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 16:20:47 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 16:20:47 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Sat Feb 16 16:37:05 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 16:37:06 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 16:37:06 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 16:37:06 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Sat Feb 16 16:37:17 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:20 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:24 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:24 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:24 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:25 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:25 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:37:26 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:38:01 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:39:19 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 16:39:20 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 16:39:20 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 16:39:20 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Sat Feb 16 16:39:24 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:39:42 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:48:00 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:48:02 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:49:51 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 16:49:52 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 16:49:52 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 16:49:52 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Sat Feb 16 16:49:55 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:49:56 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:49:58 2013] [error] [client 131.231.153.48] File does not exist: /var/www/favicon.ico
  [Sat Feb 16 16:53:21 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 16:53:22 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 16:53:22 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 16:53:22 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Sat Feb 16 16:55:34 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 16:55:35 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 16:55:35 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 16:55:35 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Sat Feb 16 17:00:07 2013] [notice] caught SIGTERM, shutting down
  [Sat Feb 16 17:00:08 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Sat Feb 16 17:00:08 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Sat Feb 16 17:00:08 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  </code></pre>