0

I am trying to run a Django project through Apache with Mod_wsgi on Windows. I installed Apache as a service and installed mod_wsgi to my Python, and then copied it over to my Apache modules. I added the configuration details that the mod_wsgi documentation talks about, but when I try to run Apache it triggers:

"Mod_Wsgi Error: "invalid Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration...."

mod_wsgi downloaded to Apache modules

Apache httpd.conf:

Define SRVROOT "C:\Users\(me)\Desktop\httpd-2.4.51-win64- 
VS16\Apache24"

ServerRoot "C:\Users\(me)\Desktop\httpd-2.4.51-win64 
VS16\Apache24"


WSGIScriptAlias /C:/Users/(me)/Desktop/coding_stuff/django_webpage_project/django_webpage_project/wsg 
 i.py

WSGIPythonHome C:/Users/(me)/Desktop/coding_stuff/env/venv_1
WSGIPythonPath C:/Users/(me)/Desktop/coding_stuff/django_webpage_project

<Directory/C:/Users/(me)/Desktop/coding_stuff/django_webpage_project/django_webpage_project>
 <Files wsgi.py>
 Require all granted
 </Files>
 </Directory>
  • maybe this helps: https://stackoverflow.com/questions/59801387/how-to-install-mod-wsgi-into-apache-on-windows – Razenstein Dec 10 '21 at 19:22
  • Thanks, but I actually already referenced this post when installing mod_wsgi. The problem is that the configuration the person in the first answer talks about pasting into httpd.conf is not being recognized by Apache for some reason. – JalenWithTheHead Dec 11 '21 at 02:50
  • Pleae post the relevant part of httpd.conf and httpd-vhost.conf. please do not post them as screen shots – Razenstein Dec 11 '21 at 04:15

1 Answers1

1

Issue was that the Mod_wsgi files I downloaded were missing the 'modules.so' shared object file that Apache needs to run Mod_wsgi. Still don't know where to acquire this file, but that is certainly the issue.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 24 '21 at 14:43