简体   繁体   中英

mod_wsgi not found for apache/windows

I can't force my Apache 2.2 to load mod_wsgi module.

When I remove following line from httpd.conf, it starts correctly:

`LoadModule wsgi_module modules/mod_wsgi.so`

I get this error when trying to start apache.

`httpd.exe: Syntax error on line 129 of D:/Apache2.2/conf/httpd.conf: Cannot load D:/Apache2.2/modules/mod_wsgi.so into server: The specified module could not be found. `

Environment:
- Apache 2.2.16 x86 VC9 (from ApacheLounge.com)
- Python 2.7.1 AMD64 (installed for all users)
- Added Python path to System Path
- Python working correctly with CGI

I searched a lot of info, none of them helped.

Anyone has any ideas?

Only confirmed explanation for this problem so far, bar the obvious of the file not actually being there or named wrongly, is that the Python version being used wasn't installed for all users and was only installed for yourself.

Because Apache run as a special service user, if Python installed for yourself, that service user may not be able to find it. For whatever reason the error suggests that the mod_wsgi.so file cannot be found even though the real issue is that some file in Python installation, possibly the DLL for Python, cannot be found.

Suggest you uninstall Python and then reinstall it, making sure it is installed for all users.

Last time I worked with windows they had dll files. So it should at least be LoadModule wsgi_module modules/mod_wsgi.dll

Do you have the dll file in your installation?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM