Hello All,
I am setting up a new web server using the following:
(venv) [dev_user@96f98ccbad74 ~]$ pip freeze
asgiref==3.3.1
Django==3.1.5
mod-wsgi==4.7.1
pytz==2020.5
sqlparse==0.4.1
(venv) [dev_user@96f98ccbad74 ~]$ python --version
Python 3.6.8
(venv) [dev_user@96f98ccbad74 ~]$ httpd -v
Server version: Apache/2.4.6 (CentOS)
I used the following command to place the mod_wsgi module from 4.7.1 into the modules directory in the apache directory:
mod_wsgi-express install-module
Which resulted in this output:
WSGIPythonHome "/home/dev_user/venv"
I removed the "" and placed those two lines in my httpd.conf file with some other lines as well:
WSGIScriptAlias / /home/dev_user/integra/integra/wsgi.py
WSGIPythonHome /home/dev_user/venv
WSGIPythonPath /home/dev_user/integra
#IncludeOptional conf.d/*.conf
<Directory /home/dev_user/integra/integra>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Directory structure
(venv) [dev_user@96f98ccbad74 home]$ ls dev_user
integra venv
(venv) [dev_user@96f98ccbad74 home]$ ls dev_user/integra
core integra manage.py
(venv) [dev_user@96f98ccbad74 home]$ ls dev_user/integra/integra
asgi.py __init__.py settings.py urls.py wsgi.py
I'm not sure what I am missing but I cannot reach my site and the error in the log file is:
[Mon Jan 25 17:25:07.931962 2021] [:info] [pid 50384] mod_wsgi (pid=50384): Python home /home/dev_user/venv.
[Mon Jan 25 17:25:07.931997 2021] [:info] [pid 50384] mod_wsgi (pid=50384): Initializing Python.
ImportError: No module named site
ImportError: No module named site
ImportError: No module named site
Thank you for the help in advance!