I am trying to deploy a Django Application using Apache on an Ubuntu Server, I am having a weird error (500 internal error server error) when using port :80.
I made some test using port :8000 running the command:
python3 manage.py runserver 0.0.0.0:8000
And the application is working without any problem there, but when I try to access the application using port 80 it does work.
My apache config file looks like this:
<VirtualHost *:80>
Alias /static /home/ubuntu/gh_system/static
<Directory /home/ubuntu/gh_system/static>
Require all granted
</Directory>
<Directory /home/ubuntu/gh_system/HRSYSTEM>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess HRSYSTEM python-home=/home/ubuntu/gh_system/env python-path=/home/ubuntu/gh_system>
WSGIProcessGroup HRSYSTEM
WSGIScriptAlias / /home/ubuntu/gh_system/HRSYSTEM/wsgi.py
I reviewed the apached2 errors logs, and I am getting a: No module named 'django', my wsgi files is:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HRSYSTEM.settings")
application = get_wsgi_application()