简体   繁体   English

找不到apache / windows的mod_wsgi

[英]mod_wsgi not found for apache/windows

I can't force my Apache 2.2 to load mod_wsgi module. 我无法强制我的Apache 2.2加载mod_wsgi模块。

When I remove following line from httpd.conf, it starts correctly: 当我从httpd.conf中删除以下行时,它正确启动:

`LoadModule wsgi_module modules/mod_wsgi.so`

I get this error when trying to start apache. 尝试启动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) - Apache 2.2.16 x86 VC9(来自ApacheLounge.com)
- Python 2.7.1 AMD64 (installed for all users) - Python 2.7.1 AMD64(为所有用户安装)
- Added Python path to System Path - 添加了System Path的Python路径
- Python working correctly with CGI - Python与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. 到目前为止,只有对这个问题的确认解释,显然文件实际上并不存在或者命名错误,是因为没有为所有用户安装使用的Python版本,而且只为自己安装。

Because Apache run as a special service user, if Python installed for yourself, that service user may not be able to find it. 因为Apache作为特殊服务用户运行,如果为自己安装了Python,那么该服务用户可能无法找到它。 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. 无论出于何种原因,错误表明无法找到mod_wsgi.so文件,即使真正的问题是Python安装中的某些文件(可能是Python的DLL)无法找到。

Suggest you uninstall Python and then reinstall it, making sure it is installed for all users. 建议您卸载Python然后重新安装它,确保为所有用户安装它。

Last time I worked with windows they had dll files. 上次我使用Windows时,他们有dll文件。 So it should at least be LoadModule wsgi_module modules/mod_wsgi.dll 所以它至少应该是LoadModule wsgi_module modules / mod_wsgi.dll

Do you have the dll file in your installation? 你的安装中有dll文件吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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