title: Cannot solve mod_wsgi exception in Django setup
body: <p>I'm working with my hosting provider to get a Django application up and running, but neither of us are very experienced and we've basically hit a complete dead end.</p>
  
  <p>I don't have direct access to the conf file but here's how its contents have been described to me:</p>
  
  <pre><code>&lt;IfModule mod_wsgi.c&gt;
  WSGIScriptAlias /fredapp/ /home/fred/public_html/cgi-bin/fredapp/apache/django.wsgi
  WSGIDaemonProcess fred threads=15 display-name=%{GROUP} python-path=/home/fred/public_html/cgi-bin/fredapp/apache/
  WSGIProcessGroup fred
  WSGIApplicationGroup %{GLOBAL}
  &lt;/IfModule&gt;
  
  Alias /robots.txt /home/fred/public_html/fred-site/robots.txt
  Alias /favicon.ico /home/fred/public_html/fred-site/favicon.ico
  
  Alias /settings/media/ /home/fred/public_html/fred-site/media/
  </code></pre>
  
  <p>My "django.wsgi" script is nothing fancy:</p>
  
  <pre><code>import os, sys
  sys.path.append('/home/fred/public_html/cgi-bin/')
  sys.path.append('/home/fred/public_html/cgi-bin/fredapp/')
  os.environ['DJANGO_SETTINGS_MODULE'] = 'fredapp.settings'
  
  import django.core.handlers.wsgi
  
  application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>So my understanding is that all this means that if a request comes in for domain.com/fredapp/ that it should be turned over to the application via django.wsgi. However, the only response I get is:</p>
  
  <pre><code>[Fri Jan 22 18:46:08 2010] [error] [client xx.xxx.xx.xx] File does not exist: /home/fred/public_html/domain.com/500.shtml
  [Fri Jan 22 18:46:08 2010] [error] [client xx.xxx.xx.xx] mod_wsgi (pid=26760): Exception occurred processing WSGI script '/home/fred/public_html/cgi-bin/fredapp/apache/django.wsgi'.
  [Fri Jan 22 18:46:03 2010] [error] [client xx.xxx.xx.xx] File does not exist: /home/fred/public_html/domain.com/404.shtml
  [Fri Jan 22 18:46:03 2010] [error] [client xx.xxx.xx.xx] File does not exist: /home/fred/public_html/domain
  </code></pre>
  
  <p>This is running under Apache on Linux. I have tried running each line of the .wsgi script in the Python interpreter on the server, and none of them return any errors. I also tried the <code>sys.stdout = sys.stderr</code> trick and got no further output than what is above. The File does not exist errors have to do with the rest of the site's set-up and occur on any request. I haven't finished setting all that up properly (error pages and index pages and so on) because I'm just trying to get the app itself to run.</p>
  
  <p>I've gotten this app up and running under Apache on my own machine, though NOT in Daemon mode, but it's my first Django app, and I don't think my hosting provider has ever configured one before, so we're flying a little blind. If anyone has any suggestions, I'd be very grateful. Thank you!</p>