Apache2 Ubuntu Server Module not found 'django' - django

I have been trying to move a django project on my Linode server into production. After trying to use Apache and wsgi by following an online tutorial by Corey Schafer, I have encountered the following problem. I cannot for the life of my understand why this is happening, and have included error logs, my wsgi.py and my .conf file below.
[Tue Sep 29 23:20:35.753537 2020] [wsgi:error] [pid 143850:tid 140318623627008] [remote 90.214.108.58:50288] from django.core.wsgi import get_wsgi_application
[Tue Sep 29 23:20:35.753556 2020] [wsgi:error] [pid 143850:tid 140318623627008] [remote 90.214.108.58:50288] ModuleNotFoundError: No module named 'django'
[Tue Sep 29 23:28:18.507904 2020] [mpm_event:notice] [pid 143849:tid 140318652456000] AH00491: caught SIGTERM, shutting down
[Tue Sep 29 23:28:18.590367 2020] [mpm_event:notice] [pid 143989:tid 139664706964544] AH00489: Apache/2.4.41 (Ubuntu) mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
[Tue Sep 29 23:28:18.590439 2020] [core:notice] [pid 143989:tid 139664706964544] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 29 23:28:24.089588 2020] [wsgi:error] [pid 143990:tid 139664678135552] [remote 90.214.108.58:50411] mod_wsgi (pid=143990): Failed to exec Python script file '/home/myname/projects/uw5-backend/u>
[Tue Sep 29 23:28:24.089643 2020] [wsgi:error] [pid 143990:tid 139664678135552] [remote 90.214.108.58:50411] mod_wsgi (pid=143990): Exception occurred processing WSGI script '/home/myname/projects/uw5-b>
[Tue Sep 29 23:28:24.095135 2020] [wsgi:error] [pid 143990:tid 139664678135552] [remote 90.214.108.58:50411] Traceback (most recent call last):
[Tue Sep 29 23:28:24.095172 2020] [wsgi:error] [pid 143990:tid 139664678135552] [remote 90.214.108.58:50411] File "/home/myname/projects/uw5-backend/uw5tables/wsgi.py", line 13, in <module>
[Tue Sep 29 23:28:24.095178 2020] [wsgi:error] [pid 143990:tid 139664678135552] [remote 90.214.108.58:50411] from django.core.wsgi import get_wsgi_application
[Tue Sep 29 23:28:24.095195 2020] [wsgi:error] [pid 143990:tid 139664678135552] [remote 90.214.108.58:50411] ModuleNotFoundError: No module named 'django'
wsgi.py
import os
import sys
from django.core.wsgi import get_wsgi_application
# add the hellodjango project path into the sys.path
sys.path.append('home/myname/projects/uw5-backend')
# add the virtualenv site-packages path to the sys.path
sys.path.append('home/myname/projects/uw5-backend/venv2/bin')
# poiting to the project settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'uw5tables.settings')
application = get_wsgi_application()
.conf
<Directory /home/myname/projects/uw5-backend/uw5tables>
<Files wsgi.py>
Order deny,allow
Require all granted
</Files>
</Directory>
WSGIScriptAlias / /home/myname/projects/uw5-backend/uw5tables/wsgi.py
WSGIDaemonProcess django_app python-path=/home/myname/projects/uw5-backend python-home=/home/myname/projects/uw5-backend/venv2
WSGIProcessGroup django_app
</VirtualHost>

Related

Deployement on a Django Api

I'm actually developping a Django Rest API with the djangoRestFramework, I configured followed many tutorials and finally configured it. For the next step, I tried to deploy the API on an Apache web server.
Here is my wsgi.py :
"""
WSGI config for take_care_api project.
It exposes the WSGI callable as a module-level variable named application.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
import sys
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'take_care_api.settings')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
My 000-default.conf :
LoadModule wsgi_module modules/mod_wsgi_python3.so
<VirtualHost *:80>
ServerAdmin renoidur#localhost
# DocumentRoot /etc/take_care_api/
DocumentRoot /var/www/html
Alias /static /api/site/static
ErrorLog /api/site/logs/error.log
CustomLog /api/site/logs/access.log combined
<Directory /api/take_care_api/take_care_api/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess take_care_api python-path=/api/take_care_api/
WSGIProcessGroup take_care_api
WSGIScriptAlias / /api/take_care_api/take_care_api/wsgi.py
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
When I tried to access to my django project trought the browser, I received this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at renoidur#localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.38 (Debian) Server at localhost Port 9000
error.log :
[Sun Mar 07 18:06:37.772216 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] mod_wsgi (pid=19400): Failed to exec Python script file '/api/take_care_api/take_care_api/wsgi.py'.
[Sun Mar 07 18:06:37.772284 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] mod_wsgi (pid=19400): Exception occurred processing WSGI script '/api/take_care_api/take_care_api/wsgi.py'.
[Sun Mar 07 18:06:37.772410 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] Traceback (most recent call last):
[Sun Mar 07 18:06:37.772447 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] File "/api/take_care_api/take_care_api/wsgi.py", line 17, in <module>
[Sun Mar 07 18:06:37.772452 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] application = get_wsgi_application()
[Sun Mar 07 18:06:37.772459 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] File "/usr/local/lib/python3.7/dist-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Mar 07 18:06:37.772463 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] django.setup(set_prefix=False)
[Sun Mar 07 18:06:37.772469 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup
[Sun Mar 07 18:06:37.772473 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] apps.populate(settings.INSTALLED_APPS)
[Sun Mar 07 18:06:37.772479 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 83, in populate
[Sun Mar 07 18:06:37.772483 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] raise RuntimeError("populate() isn't reentrant")
[Sun Mar 07 18:06:37.772498 2021] [wsgi:error] [pid 19400:tid 140138505574144] [remote ::1:36108] RuntimeError: populate() isn't reentrant
I'm a newbie so I dont't really understand what is wrong with my code.Also, I don't use Virtualenv.
Thank you very much.

Target WSGI script '/var/www/backend/backend/wsgi.py' cannot be loaded as Python module

I'm deploying a Django web app on ubuntu server. Configuration are set. But, somehow, it show an 500 Internal Server Error. I checked the apache error log and found the following error entry :
[Tue Mar 26 08:50:56.540300 2019] [wsgi:error] [pid 18832] [remote 27.61.32.236:42365] mod_wsgi (pid=18832): Target WSGI script '/var/www/backend/backend/wsgi.py' cannot be loaded as Python module.
[Tue Mar 26 08:50:56.540376 2019] [wsgi:error] [pid 18832] [remote 27.61.32.236:42365] mod_wsgi (pid=18832): Exception occurred processing WSGI script '/var/www/backend/backend/wsgi.py'.
[Tue Mar 26 08:50:56.540498 2019] [wsgi:error] [pid 18832] [remote 27.61.32.236:42365] Traceback (most recent call last):
[Tue Mar 26 08:50:56.540542 2019] [wsgi:error] [pid 18832] [remote 27.61.32.236:42365] File "/var/www/backend/backend/wsgi.py", line 12, in <module>
[Tue Mar 26 08:50:56.540553 2019] [wsgi:error] [pid 18832] [remote 27.61.32.236:42365] from django.core.wsgi import get_wsgi_application
[Tue Mar 26 08:50:56.540584 2019] [wsgi:error] [pid 18832] [remote 27.61.32.236:42365] ImportError: No module named 'django'
I have tried the solutions for the same error found on stackoverflow. Is there anything I'm still missing on these configurations ?
Apache Configuration
Listen 8000
<VirtualHost *:8000>
WSGIDaemonProcess backendapp python-home=/var/www/backend/venv python-path=/var/www/backend
WSGIProcessGroup backendapp
WSGIPassAuthorization On
WSGIScriptAlias / /var/www/backend/backend/wsgi.py
ErrorLog /var/www/backend/error.log
CustomLog /var/www/backend/access.log combined
</VirtualHost>
wsgi.py
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")
application = get_wsgi_application()
using python 3.6 and mod_wsgi is enabled on server.

Target WSGI script cannot be loaded as a python module and ImportError: No module named 'django'

I'm try to deploy virtual host my django project into apache2 via mod_wsgi WSGIDaemon method, i'm using ubuntu 16.04 and i'm getting following error.
From apache2 error log:
[Tue Dec 11 11:55:31.748517 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] mod_wsgi (pid=14231): Target WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py' cannot be loaded as Python module.
[Tue Dec 11 11:55:31.748570 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] mod_wsgi (pid=14231): Exception occurred processing WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py'.
[Tue Dec 11 11:55:31.748639 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] Traceback (most recent call last):
[Tue Dec 11 11:55:31.748657 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] File "/var/www/html/rasa_django/rasa_django/wsgi.py", line 12, in
[Tue Dec 11 11:55:31.748662 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] from django.core.wsgi import get_wsgi_application
[Tue Dec 11 11:55:31.748677 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] ImportError: No module named 'django'
[Tue Dec 11 11:55:31.787336 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] mod_wsgi (pid=14231): Target WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py' cannot be loaded as Python module.
[Tue Dec 11 11:55:31.787379 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] mod_wsgi (pid=14231): Exception occurred processing WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py'.
[Tue Dec 11 11:55:31.787447 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] Traceback (most recent call last):
[Tue Dec 11 11:55:31.787465 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] File "/var/www/html/rasa_django/rasa_django/wsgi.py", line 12, in
[Tue Dec 11 11:55:31.787470 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] from django.core.wsgi import get_wsgi_application
[Tue Dec 11 11:55:31.787484 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] ImportError: No module named 'django'
In my host file 000-default.conf:
ServerName www.rasa_django.com
DocumentRoot /var/www/html/rasa_django
ErrorLog /var/www/logs/error.log
CustomLog /var/www/logs/custom.log combined
Alias /static /var/www/html/rasa_django/static
<Directory /var/www/html/rasa_django/static>
Require all granted
</Directory>
<Directory /var/www/html/rasa_django/rasa_django>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess rasa_django.com python-path=/var/www/html/rasa_django python-home=/home/aarbor_01/env_site1/lib/python3.6/site-packages
WSGIProcessGroup rasa_django.com
WSGIScriptAlias / /var/www/html/rasa_django/rasa_django/wsgi.py
Here my wsgi.py file:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rasa_django.settings')
application = get_wsgi_application()
According to the docs, if you're using a virtual environment (which I'm assuming env_site1 is), then you should point python-home to the root of that environment.
Try:
WSGIDaemonProcess rasa_django.com python-path=/var/www/html/rasa_django python-home=/home/aarbor_01/env_site1
I'm cleared the issue by folling link https://github.com/GrahamDumpleton/mod_wsgi/issues/378

Issues getting Python 2.7 to work with my django project

For a while now I have been trying to get my django project install of badgr (badgr-server on github) working with mod_wsgi. I am pretty way in over my head but I do believe I have made some progress. Here is the error message I am currently getting:
[Thu Nov 17 12:48:48.182772 2016] [core:notice] [pid 24556] AH00094: Command line: '/opt/rh/httpd24/root/usr/sbin/httpd'
[Thu Nov 17 12:48:50.421089 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] mod_wsgi (pid=24558): Target WSGI script '/opt/badgr/code/apps/mainsite/wsgi.py' cannot be loaded as Python module.
[Thu Nov 17 12:48:50.421165 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] mod_wsgi (pid=24558): Exception occurred processing WSGI script '/opt/badgr/code/apps/mainsite/wsgi.py'.
[Thu Nov 17 12:48:50.421200 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] Traceback (most recent call last):
[Thu Nov 17 12:48:50.421228 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] File "/opt/badgr/code/apps/mainsite/wsgi.py", line 27, in <module>
[Thu Nov 17 12:48:50.421348 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] application = get_wsgi_application()
[Thu Nov 17 12:48:50.421374 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] File "/opt/badgr/env/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Thu Nov 17 12:48:50.421450 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] django.setup()
[Thu Nov 17 12:48:50.421472 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] File "/opt/badgr/env/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
[Thu Nov 17 12:48:50.421558 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Thu Nov 17 12:48:50.421581 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] File "/opt/badgr/env/lib/python2.7/site-packages/django/conf/__init__.py", line 46, in __getattr__
[Thu Nov 17 12:48:50.421705 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] self._setup(name)
[Thu Nov 17 12:48:50.421728 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] File "/opt/badgr/env/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
[Thu Nov 17 12:48:50.421764 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] self._wrapped = Settings(settings_module)
[Thu Nov 17 12:48:50.421782 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] File "/opt/badgr/env/lib/python2.7/site-packages/django/conf/__init__.py", line 98, in __init__
[Thu Nov 17 12:48:50.421811 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] % (self.SETTINGS_MODULE, e)
[Thu Nov 17 12:48:50.421841 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] ImportError: Could not import settings 'settings' (Is it on sys.path? Is there an import error in the settings file?): No module named settings`
Here is a copy of my wsgi.py (/opt/badgr/code/apps/mainsite/wsgi.py):
"""
WSGI config for badgr project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import sys
import os
import site
activate_this = os.path.expanduser("/opt/badgr/env/bin/activate_this.py")
execfile(activate_this, dict(__file__=activate_this))
path = '/opt/badgr/code/apps/mainsite'
if path not in sys.path:
sys.path.append(path)
os.environ["DJANGO_SETTINGS_MODULE"] = 'settings'
site.addsitedir('/opt/badgr/env/lib/python2.7/site-packages')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
I am pretty sure my settings file is /opt/badgr/code/apps/mainsite/settings.py (or .pyc). But it seems to have trouble being called up.
Also it should be noted that I am running an env of Python 2.7:
/opt/badgr/env/lib/python2.7/
Finnally: Here is my django config in httpd24 (/opt/rh/httpd24/root/etc/httpd/conf.d/django.conf):
Alias /static /opt/badgr/code/staticfiles
<Directory /opt/badgr/code/staticfiles>
Require all granted
</Directory>
<Directory /opt/badgr/code/apps/mainsite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGISocketPrefix /var/run/wsgi/wsgi
WSGIDaemonProcess badgr
WSGIProcessGroup badgr
WSGIPythonPath /opt/badgr:/opt/badgr/env/lib/python2.7/site-packages
WSGIScriptAlias / /opt/badgr/code/apps/mainsite/wsgi.py
WSGIPythonHome /opt/badgr/env
Any help or assistance appreciated.
For the Apache configuration try using:
Alias /static /opt/badgr/code/staticfiles
<Directory /opt/badgr/code/staticfiles>
Require all granted
</Directory>
<Directory /opt/badgr/code/apps/mainsite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGISocketPrefix /var/run/wsgi/wsgi
WSGIRestrictEmbedded On
WSGIDaemonProcess badge python-home=/opt/badgr/env python-path=/opt/badgr/code/apps
WSGIProcessGroup badge
WSGIScriptAlias / /opt/badgr/code/apps/mainsite/wsgi.py
For the wsgi.py file revert it back to being similar to what was created originally.
import os
os.environ["DJANGO_SETTINGS_MODULE"] = 'mainsite.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
The WSGIRestrictEmbedded ensures only mod_wsgi daemon mode is used.
Set the location of the Python virtual environment using python-home option to WSGIDaemonProcess. Set the parent directory of your project in python-path. Change DJANGO_SETTINGS_MODULE to include the project name in module path again.
UPDATE 1
Add to the wsgi.py file:
import sys
print 'SYS.PATH = %r' % sys.path
Check the Apache error log to see what the path is and verify that the parent directory above where your project is, is listed.

Multiple Sites with Django, Virtualenv, and WSGI on Apache

The goal is to run Django in daemon mode on Apache via WSGI. I plan to run it on port 8000 to keep it separate from PHP files running at the root of server's URL (unless there's a better way to keep my web applications separate). It's setup with Virtualenv.
Server is named server.family.local
The simplified file structure is:
/home
/wwww
/django
/my_project
/app1
/app2
/project
wsgi.py
/env
/lib
/python3.5
/site-packages
The system runs properly when I activate the Virtualenv and use the manage.py file:
/home/www/django/my_project/manage.py runserver 0.0.0.0:8000
I'm trying to setup the WSGI on Apache so I don't have to manually run that command every time. My wsgi.py file consists of this:
import os
import sys
from django.core.wsgi import get_wsgi_application
sys.path.append('/home/www/django/my_project')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
application = get_wsgi_application()
The VirtualHost file for Apache, server_django.conf, has this:
<VirtualHost *:8000>
WSGIScriptAlias / /home/www/django/my_project/project/wsgi.py
WSGIProcessGroup my_project
WSGIDaemonProcess my_project python-path=/home/www/django/my_project/vision:/home/www/django/env/lib/python3.5/site-packages
Alias /static /home/www/django/my_project/project/static
<Directory /home/www/django/my_project/project/static>
Require all granted
</Directory>
<Directory /home/www/django/my_project/project>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
I've enabled the site using a2ensite. I checked that I have only libapache2-mod-wsgi-py3 installed (not libpache2-mod-python or libpache2-mod-wsgi). I think permissions are safe. Owner is my name but group is www, which is what Apache uses. The virtualenv directory has the same owner, group, and 775 permissions tag. The Python version could be an issue but I don't think it should be. When I'm in the virtualenv and run python -V, I get Python 3.5.1+. Outside the virtualenv, I get Python 2.7.12. My understanding is that this is why we use virtualenv - to isolate versions. So, if the Apache Virtual Host and the wsgi.py files are configured correctly, this shouldn't be the problem (I think).
When I try to reach my site at http://server.family.local:8000 I get a 500 Internal Server Error and find the following statements in the Apache error log.
[Wed Jul 27 22:56:05.850055 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Target WSGI script '/home/www/django/my_project/project/wsgi.py' cannot be loaded as Python module.
[Wed Jul 27 22:56:05.850199 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Exception occurred processing WSGI script '/home/www/django/my_project/project/wsgi.py'.
[Wed Jul 27 22:56:05.850645 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] Traceback (most recent call last):
[Wed Jul 27 22:56:05.850721 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] File "/home/www/django/my_project/project/wsgi.py", line 13, in <module>
[Wed Jul 27 22:56:05.850735 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] from django.core.wsgi import get_wsgi_application
[Wed Jul 27 22:56:05.850787 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] ImportError: No module named 'django'
[Wed Jul 27 22:56:06.062315 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Target WSGI script '/home/www/django/my_project/project/wsgi.py' cannot be loaded as Python module.
[Wed Jul 27 22:56:06.062405 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Exception occurred processing WSGI script '/home/www/django/my_project/project/wsgi.py'.
[Wed Jul 27 22:56:06.062573 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] Traceback (most recent call last):
[Wed Jul 27 22:56:06.062625 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] File "/home/www/django/my_project/project/wsgi.py", line 13, in <module>
[Wed Jul 27 22:56:06.062637 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] from django.core.wsgi import get_wsgi_application
[Wed Jul 27 22:56:06.062684 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] ImportError: No module named 'django'
[Wed Jul 27 22:56:06.467512 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Target WSGI script '/home/www/django/my_project/project/wsgi.py' cannot be loaded as Python module.
[Wed Jul 27 22:56:06.467594 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Exception occurred processing WSGI script '/home/www/django/my_project/project/wsgi.py'.
[Wed Jul 27 22:56:06.467757 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] Traceback (most recent call last):
[Wed Jul 27 22:56:06.467809 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] File "/home/www/django/my_project/project/wsgi.py", line 13, in <module>
[Wed Jul 27 22:56:06.467822 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] from django.core.wsgi import get_wsgi_application
[Wed Jul 27 22:56:06.467868 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] ImportError: No module named 'django'
[Wed Jul 27 22:56:06.658228 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Target WSGI script '/home/www/django/my_project/project/wsgi.py' cannot be loaded as Python module.
[Wed Jul 27 22:56:06.658312 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] mod_wsgi (pid=1003): Exception occurred processing WSGI script '/home/www/django/my_project/project/wsgi.py'.
[Wed Jul 27 22:56:06.658476 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] Traceback (most recent call last):
[Wed Jul 27 22:56:06.658527 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] File "/home/www/django/my_project/project/wsgi.py", line 13, in <module>
[Wed Jul 27 22:56:06.658540 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] from django.core.wsgi import get_wsgi_application
[Wed Jul 27 22:56:06.658587 2016] [wsgi:error] [pid 1003] [remote 192.168.14.185:3382] ImportError: No module named 'django'
I'm not an expert but seems that the problem starts with it's unable to load the wsgi.py file but I can't see why that would be any problem. Any help would be great. Thank you.