I am trying to setup a Django server running on Ubuntu 20.04 using Python 3.10.6 and Django 4.1.1
When Django tries to run get_wsgi_application() it throws the error: ModuleNotFoundError: No module named 'djangoProject'
I'm NOT running in a virtual environment and I'm using the following in /etc/apache2/conf-available/mod-wsgi.conf
WSGIScriptAlias /pages /var/www/django_root/djangoProject/djangoProject/wsgi.py
WSGIPythonPath /var/www/django_root/DjangoProject
<Directory /var/www/django_root/DjangoProject>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIScriptAlias /test_wsgi /var/www/django_root/test_wsgi_script.py
my original file only had lines 1 and 8, same results.
I am using the default wsgi file:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings')
application = get_wsgi_application()
I know it's something quite simple, but I have exhausted all of the things I can think of, and I'm not quite sure where get_wsgi_application() is getting it's path info from or exactly what it's looking for a path to...