title: ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI
body: <p>I am trying to publish my site on an Amazon's EC2 Instance, and I keep getting a 500 error. I really don't know why.</p>
  <p>//Log Files</p>
  <pre><code>    [Sun Feb 17 23:12:48.066802 2013] mod_wsgi (pid=2102): Target WSGI script '/srv/www/app/poka/apache/wsgi.py' cannot be loaded as Python module.
      [Sun Feb 17 23:12:48.066840 2013] mod_wsgi (pid=2102): Exception occurred processing WSGI script '/srv/www/app/poka/apache/wsgi.py'.
      [Sun Feb 17 23:12:48.066864 2013] Traceback (most recent call last):
      [Sun Feb 17 23:12:48.066889 2013] File &quot;/srv/www/mysite/poka/apache/wsgi.py&quot;, line 26, in &lt;module&gt;
      [Sun Feb 17 23:12:48.066920 2013] from django.core.wsgi import get_wsgi_application
      [Sun Feb 17 23:12:48.066945 2013] ImportError: No module named django.core.wsgi
  </code></pre>
  <p>//Apache Config Files</p>
  <pre><code>    WSGIScriptAlias / /srv/www/app/mysite/apache/wsgi.py
  
      WSGIDaemonProcess mysite python-path=/srv/www/app/mysite:/home/ec2-user/.virtualenvs/mysite-main/lib/python2.7/site-packages
      WSGIProcessGroup mysite
  
      &lt;Directory /srv/www/app/mysite/apache/&gt;
      &lt;Files wsgi.py&gt;
      Order deny,allow
      Allow from all
      &lt;/Files&gt;
      &lt;/Directory&gt;
  
      &lt;Directory /srv/www/app/mysite/apache/&gt;
      Order deny,allow
      Allow from all
      &lt;/Directory&gt;
  
      &lt;Directory /home/ec2-user/app/mysite/static&gt;
      Order deny,allow
      Allow from all
      &lt;/Directory&gt;
  
      &lt;Directory /home/ec2-user/app/mysite/media&gt;
      Order deny,allow
      Allow from all
      &lt;/Directory&gt;
  </code></pre>
  <p>//wsgi.py</p>
  <pre><code>    import os
      import sys
      import site
  
      site.addsitedir('/home/ec2-user/.virtualenvs/mysite-main/lib/python2.7/site-packages')
      os.environ.setdefault(&quot;DJANGO_SETTINGS_MODULE&quot;, &quot;mysite.settings&quot;)
  
      from django.core.wsgi import get_wsgi_application
      application = get_wsgi_application()
  
      path = '/srv/www/app/mysite'
  
      if path not in sys.path:
          sys.path.append(path)
  </code></pre>