title: 500 Internal Server Error django + mod_wsgi + apache2 on ubuntu 16
body: <p>I am trying to deploy my application on Ubuntu server i have done everything correct as far as i know but i am always getting the 500 internal server issue error.</p>
  
  <p>I have tried so many troubleshooting guides but i cannot find anything useful that ca resolve the issue.
  Here is the /etc/apache2/sites-available conf file </p>
  
  <pre><code>        Alias /static /home/local/user/wesupportapp/static
          &lt;Directory /home/local/user/wesupportapp/static&gt;
                  Require all granted
          &lt;/Directory&gt;
  
          Alias /media /home/local/user/wesupportapp/media
          &lt;Directory /home/local/user/wesupportapp/media&gt;
                  Require all granted
          &lt;/Directory&gt;
  
           &lt;Directory /home/local/user/wesupportapp/wesupportapp&gt;
  
          &lt;Files wsgi.py&gt;
          Require all granted
          &lt;/Files&gt;
    &lt;/Directory&gt;
  
    WSGIScriptAlias / /home/local/user/wesupportapp/wesupportapp/wsgi.py
    WSGIDaemonProcess django_app python-path=/home/local/user/wesupportapp python-home=/home/local/user/wesupportapp/venv
    WSGIProcessGroup django_app
  
  </code></pre>
  
  <p>When i run the application on the development server of django everything works well but once i enable the app conf file i have the 500 error.</p>
  
  <p>If someone had the same issue that i am facing that can really help me resolving this it will be so much appreciated.</p>
  
  <p>apache2 error log </p>
  
  <pre><code>[Tue Jul 16 10:42:33.386640 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.72.15.5:3756]   File "/home/local/user/wesupportapp/wesupportapp/wsgi.py", line 12, in &lt;module&gt;
  [Tue Jul 16 10:42:33.386644 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.72.15.5:3756]     from django.core.wsgi import get_wsgi_application
  [Tue Jul 16 10:42:33.386692 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.72.15.5:3756] ImportError: No module named 'django'
  [Tue Jul 16 10:47:48.994459 2019] [wsgi:error] [pid 6299:tid 139834212525824] [remote 10.216.63.3:3756] mod_wsgi (pid=6299): Target WSGI script '/home/local/user/wesupportapp/wesupportapp/wsgi.py' cannot be loaded as P$
  [Tue Jul 16 10:47:48.994552 2019] [wsgi:error] [pid 6299:tid 139834212525824] [remote 10.216.63.3:3756] mod_wsgi (pid=6299): Exception occurred processing WSGI script '/home/local/user/wesupportapp/wesupportapp/wsgi.py$
  [Tue Jul 16 10:47:48.994706 2019] [wsgi:error] [pid 6299:tid 139834212525824] [remote 10.216.63.3:3756] Traceback (most recent call last):
  [Tue Jul 16 10:47:48.994734 2019] [wsgi:error] [pid 6299:tid 139834212525824] [remote 10.216.63.3:3756]   File "/home/local/user/wesupportapp/wesupportapp/wsgi.py", line 12, in &lt;module&gt;
  [Tue Jul 16 10:47:48.994739 2019] [wsgi:error] [pid 6299:tid 139834212525824] [remote 10.216.63.3:3756]     from django.core.wsgi import get_wsgi_application
  [Tue Jul 16 10:47:48.994764 2019] [wsgi:error] [pid 6299:tid 139834212525824] [remote 10.216.63.3:3756] ImportError: No module named 'django'
  [Tue Jul 16 11:03:42.242236 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.216.63.3:684] mod_wsgi (pid=6299): Target WSGI script '/home/local/user/wesupportapp/wesupportapp/wsgi.py' cannot be loaded as Py$
  [Tue Jul 16 11:03:42.242345 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.216.63.3:684] mod_wsgi (pid=6299): Exception occurred processing WSGI script '/home/local/user/wesupportapp/wesupportapp/wsgi.py'.
  [Tue Jul 16 11:03:42.242464 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.216.63.3:684] Traceback (most recent call last):
  [Tue Jul 16 11:03:42.242485 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.216.63.3:684]   File "/home/local/user/wesupportapp/wesupportapp/wsgi.py", line 12, in &lt;module&gt;
  [Tue Jul 16 11:03:42.242489 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.216.63.3:684]     from django.core.wsgi import get_wsgi_application
  [Tue Jul 16 11:03:42.242509 2019] [wsgi:error] [pid 6299:tid 139834262898432] [remote 10.216.63.3:684] ImportError: No module named 'django'
  
  </code></pre>