我正在尝试安装 mod_wsgi 模块操作说明 http://code.google.com/p/modwsgi/wiki/InstallationOnWindows。我从以下位置下载了 mod_wsgi.so这个来源 http://www.lfd.uci.edu/~gohlke/pythonlibs/。在我将以下行添加到 httpd.conf 后,apache 似乎无法正确重新启动服务并且无法加载页面
LoadModule wsgi_module modules/mod_wsgi.so
我从一些来源检查了一些问题,如下:
- 文件名正确 - mod_wsgi.so 而不是 mod_wsgi.so.so
- 文件的权限设置与正确加载的其他模块相同
- 为所有用户安装Python
环境:
- Windows Server® 标准 FE 64 位
- WAMP 2.0 上的 Apache 2.2.8
- 为所有用户安装Python 2.7.1
不加载这个模块,apache就可以正常运行。我的问题是什么?
应用程序错误.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.
从 apache error.log 可以清楚地看出安装的 apache 是 32 位的吗?
解决办法:将所有内容更改为 64 位。
我也遇到过这种情况,Apache 可以在 Windows 64 位上运行,但如果加载 mod_wsgi 则不会。
我找到了一个非常简单的解决方案:
- 下载并安装 64 位版本的 Apache,这很容易
如果您从下载并安装,则处理http://wampserver.com/ http://www.wampserver.com/en
- 从 下载 mod_wsgi这一页 http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
- 将下载的压缩文件的内容解压到
c:\wamp\bin\apache\Apache2.2.21\modules\
and
- Edit
httpd.conf
并添加一行:LoadModule wsgi_module modules/mod_wsgi.so
- 重新启动apache,然后你就可以继续你的django开发了。
摘要:一切(apache 和 mod_wsgi)都必须是 64 位才能在 64 位 Windows 上运行 Apache/mod_wsgi。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)