在Windows 64位上将mod_wsgi模块加载到apache的问题

Pro*_*ole 8 python windows mod-wsgi x86-64 apache2

我正在尝试按照此指令安装mod_wsgi模块.我从这个源代码下载了mod_wsgi.so .似乎apache无法正常重启服务,并且在将以下行添加到httpd.conf后无法加载页面

LoadModule wsgi_module modules/mod_wsgi.so

我从一些来源检查了一些问题如下:

  1. 文件名是正确的 - mod_wsgi.so不是mod_wsgi.so.so
  2. 文件的权限设置与正确加载的其他模块相同
  3. 为所有用户安装了Python

环境:

  • WindowsServer®标准FE 64位
  • WAMP 2.0上的Apache 2.2.8
  • 为所有用户安装了Python 2.7.1

在不加载此模块的情况下,apache正常运行.我的问题是什么?

应用程序error.log:

[Mon May 23 10:12:20 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon May 23 10:12:20 2011] [notice] Child 4528: Exit event signaled. Child process is ending.
[Mon May 23 10:12:21 2011] [notice] Child 4528: Released the start mutex
[Mon May 23 10:12:22 2011] [notice] Child 4528: All worker threads have exited.
[Mon May 23 10:12:27 2011] [notice] Child 4528: Child process is exiting
[Mon May 23 10:12:28 2011] [notice] Parent: Child process exited successfully.
[Mon May 23 10:13:46 2011] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Mon May 23 10:13:46 2011] [notice] Server built: Jan 18 2008 00:37:19
[Mon May 23 10:13:46 2011] [notice] Parent: Created child process 5316
[Mon May 23 10:13:46 2011] [notice] Child 5316: Child process is running
[Mon May 23 10:13:46 2011] [notice] Child 5316: Acquired the start mutex.
[Mon May 23 10:13:46 2011] [notice] Child 5316: Starting 64 worker threads.
[Mon May 23 10:13:46 2011] [notice] Child 5316: Starting thread to listen on port 81.
[Mon May 23 10:14:57 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon May 23 10:14:57 2011] [notice] Child 5316: Exit event signaled. Child process is ending.
[Mon May 23 10:14:58 2011] [notice] Child 5316: Released the start mutex
[Mon May 23 10:14:59 2011] [notice] Child 5316: All worker threads have exited.
[Mon May 23 10:15:04 2011] [notice] Child 5316: Child process is exiting
[Mon May 23 10:15:04 2011] [notice] Parent: Child process exited successfully.
Run Code Online (Sandbox Code Playgroud)

从apache error.log,很清楚安装的apache是​​32位吗?

Soulution:将所有内容更改为64位.

Pet*_*ter 7

我也遇到过这种情况,Apache会在Windows 64bit上运行,但是如果加载mod_wsgi则不会.

我找到了一个非常简单的解决方案:

  1. 下载并安装64位版本的Apache,如果从http://wampserver.com/下载并安装,则可以轻松处理
  2. 从此页面下载mod_wsgi
  3. 将下载的压缩文件的内容解压缩为c:\wamp\bin\apache\Apache2.2.21\modules\
  4. 编辑httpd.conf并添加如下行:LoadModule wsgi_module modules/mod_wsgi.so
  5. 重启apache,然后继续你的django开发.

总结:Everything(apache和mod_wsgi)必须是64位才能在64位窗口上运行Apache/mod_wsgi.


jed*_*mao 3

据我了解...

目前,Microsoft Windows 不存在官方 64 位版本的 Apache 和 PHP。

然而,在撰写本文时,有一个人至少已经为我们编译了Apache 2.2.19 x64,您可以在此处下载。

如果您想要更新的版本,则必须自己编译,但这将是一项艰巨的任务!

此外,即使您确实Apache x64 在 Windows 上运行良好,您打算对 mod_wsgi 做什么?这就是我决定为此目的创建一个 Arch Linux LAMP 堆栈的原因。我现在工作正常,但由于 Aptana 不与 Django 项目同步,我正在再次研究 Windows 解决方案。

如果您找到好的解决方案,请告诉我!

编辑:我找到了py2.6 和 2.7 的 64 位 mod_wsgi,但我还没有让它们工作。

编辑:是的!我成功了!我的 Apache 服务监视器亮起绿灯,现在显示 Apache/2.2.19 (Win64) mod_wsgi/3.3 Python/2.6.4。我使用 2.6.4 是因为 Autodesk Maya 正在运行该版本,并且我希望保留相同版本以保持一致性。