title: Error when serve Django 1.8 Applications with Apache2 and mod_wsgi on Ubuntu 14.04
body: <p>I am trying to serve my django project with Apache2 and mod_wsgi and I am stuck. Everything works fine until I try to integrate mod_wsgi. I am using python 3. The relevant coding are as below:</p>
  
  <hr>
  
  <h2>Apache2.conf</h2>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin myemail@example.com
          ServerName example.com
          ServerAlias www.example.com
  
          DocumentRoot /var/www/mysite
  
          Alias /static/ /var/www/mysite/static/
  
          &lt;Directory /var/www/mysite/static&gt;
          Require all granted
          &lt;/Directory&gt;
  
  
          WSGIScriptAlias / /var/www/mysite/mysite/wsgi.py
  
  
          &lt;Directory /var/www/mysite/mysite/wsgi.py&gt;
          &lt;Files wsgi.py&gt;
          Require all granted
          &lt;/Files&gt;
          &lt;/Directory&gt;
  
          # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
          # error, crit, alert, emerg.
          # It is also possible to configure the loglevel for particular
          # modules, e.g.
          #LogLevel info ssl:warn
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
          # For most configuration files from conf-available/, which are
          # enabled or disabled at a global level, it is possible to
          # include a line for only one particular virtual host. For example the
          # following line enables the CGI configuration for this host only
          # after it has been globally disabled with "a2disconf".
          #Include conf-available/serve-cgi-bin.conf
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <hr>
  
  <h2>wsgi.py</h2>
  
  <pre><code>import os
  
  from django.core.wsgi import get_wsgi_application
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
  
  application = get_wsgi_application()
  </code></pre>
  
  <hr>
  
  <h2>Error log</h2>
  
  <pre><code>[Mon Aug 03 18:45:42.192589 2015] [:error] [pid 2638:tid 140604829079296] [client 130.102.158.21:49084]   File "&lt;frozen importlib._bootstrap&gt;", line 2254, in _gcd_import
  [Mon Aug 03 18:45:42.192606 2015] [:error] [pid 2638:tid 140604829079296] [client 130.102.158.21:49084]   File "&lt;frozen importlib._bootstrap&gt;", line 2237, in _find_and_load
  [Mon Aug 03 18:45:42.192623 2015] [:error] [pid 2638:tid 140604829079296] [client 130.102.158.21:49084]   File "&lt;frozen importlib._bootstrap&gt;", line 2224, in _find_and_load_unlocked
  [Mon Aug 03 18:45:42.192649 2015] [:error] [pid 2638:tid 140604829079296] [client 130.102.158.21:49084] ImportError: No module named 'mysite'
  </code></pre>
  
  <hr>
  
  <p>I know it has something to do with how wsgi was configured in apache2.conf file, but have no idea how to fix it. Any help would be appreciated.
  Thanks</p>