I downloaded mod_wsgi from the following location for apache 2.2 and python 2.7 (64bit). (I\'m trying to get django to run on my computer).
Whenever I add the follow
How I configured Apache + Django + venv
For it to work you need 3 things:
mod_wsgi on python and apachehttpd.conf on apachemod_wsgi and in turn loads your python app1. Is described well enough in the official doc (I used the pip method). Just unpack apache distro (ApacheHaus worked for me, but not Apache Lounge, it missed some headers I think) to a standard place like C:\ or set env var MOD_WSGI_APACHE_ROOTDIR to its dir. You'll need Visual Studio Build Tools or binary distribution of mod_wsgi. Then pip install it.
2. In httpd.conf add:
LoadFile ".../pythonXY/pythonXY.dll"
LoadModule wsgi_module ".../mod_wsgi/server/mod_wsgi.cpXY-win_amd64.pyd"
WSGIPythonHome ".../pythonXY"
WSGIScriptAlias / "...\wsgi.py"
Here LoadFile may be necessary if Python isn't installed the standard way. Better to include.
WSGIPythonHome directive should point to main python distro (not venv as is usually said), because mod_wsgi may be somewhat not working properly. For instance now WSGIPythonPath is doing nothing at all. Alternatively, you can set PYTHONPATH or PYTHONHOME env vars accordingly.
Now you can monitor error log of apache (inside its log folder by default). In case of failures apache will print mod_wsgi configuration (meaning it is installed, but couldn't start python) and/or python errors if it managed to start.
3. Inside your python script (wsgy.py) you'll need to provide function "application" (so is mod_wsgi usually compiled) which starts your app. But first point python to the modules and packages it will use, your own as well, right in the script with sys.path or site.addsitedir. Django's wsgi.py is good, just prepend all path conf there.