I am trying to host a django application on Apache server using XAMPP and after going through all the settings necessary for the app to run, the webpage in 'localhost' is loading endlessly, enter image description here
Here's my setup:
Running on venv, doing a pip freeze gives:
`asgiref==3.7.2
Django==3.2.20
mod-wsgi==4.9.4
mysqlclient==2.2.0
numpy==1.25.2
pandas==1.5.1
python-dateutil==2.8.2
pytz==2023.3
six==1.16.0
sqlparse==0.4.4
typing_extensions==4.7.1`
Django App is in C:\xampp\htdocs\virtual_dealer\virtual_dealer
Directory Structure:
`C:\xampp\htdocs\virtual_dealer
|--base -> app
|--venv -> virtual environment
|--virtual_dealer -> python project
|--static -> static folder for the app
|--templates -> templates folder for the app`
Also placed MOD_WSGI_APACHE_ROOTDIR in the environment variables to be able to do a successful pip install mod_wsgi
As for the httpd.conf, here's my setting for WSGI:
`LoadFile "C:/Users/Jaya Rathina/anaconda3/python39.dll"
LoadModule wsgi_module "C:/xampp/htdocs/virtual_dealer/venv/lib/site-packages/mod_wsgi/server/mod_wsgi.cp39-win_amd64.pyd"
WSGIScriptAlias / "C:/xampp/htdocs/virtual_dealer/virtual_dealer/wsgi.py"
WSGIPythonHome "C:/xampp/htdocs/virtual_dealer/venv"
WSGIPythonPath "C:/xampp/htdocs/virtual_dealer"
Alias /static/ C:/xampp/htdocs/virtual_dealer/static/
<Directory C:/xampp/htdocs/virtual_dealer/static/>
Require all granted
</Directory>
<Directory "C:/xampp/htdocs/virtual_dealer/virtual_dealer">
<Files wsgi.py>
Require all granted
</Files>
</Directory>`
And settings in httpd-vhosts.conf,
`<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs/virtual_dealer"
</VirtualHost>`
with this,I dont see any errors in apache error logs:
`[Fri Aug 04 10:15:07.734233 2023] [mpm_winnt:crit] [pid 11560:tid 420] AH02538: Child: Parent process exited abruptly. Child process is ending
[Fri Aug 04 10:15:10.969205 2023] [core:warn] [pid 5692:tid 412] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Aug 04 10:15:11.042668 2023] [mpm_winnt:notice] [pid 5692:tid 412] AH00455: Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4 mod_wsgi/4.9.4 Python/3.9 configured -- resuming normal operations
[Fri Aug 04 10:15:11.042668 2023] [mpm_winnt:notice] [pid 5692:tid 412] AH00456: Apache Lounge VS16 Server built: Mar 7 2023 13:21:03
[Fri Aug 04 10:15:11.042668 2023] [core:notice] [pid 5692:tid 412] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Aug 04 10:15:11.042668 2023] [mpm_winnt:notice] [pid 5692:tid 412] AH00418: Parent: Created child process 17688
[Fri Aug 04 10:15:12.179471 2023] [mpm_winnt:notice] [pid 17688:tid 448] AH00354: Child: Starting 150 worker threads.
`
Anything I might have missed or have been setting incorrectly? Thanks in advance for the help!