Apache won't restart after inserting mod_wsgi [closed]
Python interested me as a web scripting language so I wanted to set it up on my testing server.
Cannot get Apache to restart with mod_wsgi
. Running xampp v win32-1.8 w/apache v2.4, python v2.7 32bit, on win7 64bit. The registry files I see for Python are in hkey_classes_root
. I not sure if that should be right but there are none in the hkey_current_user
. The one in hkey_local_machine
says default value not set.
This is what I get when I run apache_start.bat
Apache 2 is starting ...
httpd.exe: Syntax error on line 141 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/xampp/apache/modules/mod_wsgi.so into server: The specified procedure could not be found.
What I have added to httpd.conf:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /wsgi_handler "C:/xampp/wsgi/mywsgi.py"
<Directory "C:/xampp/wsgi">
Order allow,deny
Allow from all
</Directory>
Solution 1:
Check your modules directory for Apache to see if you have mod_wsgi available. Also since you're running Windows you'll be looking for a .dll file and not a .so (Unix specific).
Solution 2:
Problems with starting up Apache generally arises for the following reasons.
- Python was not installed for all users of system, but was only installed for the user that did the installation.
- Apache, Python and mod_wsgi.so are not all 32 bit, or not all 64 bit. You cannot mix 32 and 64 bit versions, must all be the same.
- If mod_wsgi.so was a binary, it is not the correct binary for Python or Apache version being used.
Note that you cannot load module mod_python and mod_wsgi at the same time if they use different Python versions.
Where did you get your mod_wsgi.so binary from. You say you are using Apache 2.4 but there are no pre built mod_wsgi.so binaries available that I know of.