没有为 apache/windows 找到 mod_wsgi

发布于 2024-10-06 20:02:04 字数 581 浏览 1 评论 0原文

我无法强制 Apache 2.2 加载 mod_wsgi 模块。

当我从 httpd.conf 中删除以下行时,它会正确启动:

`LoadModule wsgi_module modules/mod_wsgi.so`

尝试启动 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. `

环境:
- Apache 2.2.16 x86 VC9(来自 ApacheLounge.com)
- Python 2.7.1 AMD64(为所有用户安装)
- 添加了Python路径到系统路径
- Python 与 CGI 一起正常工作

我搜索了很多信息,但没有一个有帮助。

有人有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

最单纯的乌龟 2024-10-13 20:02:04

到目前为止,对该问题唯一确认的解释是,除了明显的文件实际上不存在或命名错误之外,所使用的 Python 版本并未为所有用户安装,而只是为您自己安装。

因为 Apache 作为特殊服务用户运行,如果自己安装了 Python,该服务用户可能无法找到它。无论出于何种原因,该错误表明无法找到 mod_wsgi.so 文件,即使真正的问题是无法找到 Python 安装中的某些文件(可能是 Python 的 DLL)。

建议您卸载Python,然后重新安装它,确保为所有用户安装它。

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.

陌路黄昏 2024-10-13 20:02:04

上次我使用 Windows 时,他们有 dll 文件。所以它至少应该是 LoadModule wsgi_module module/mod_wsgi.dll

您的安装中有 dll 文件吗?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文