64位Windows下将mod_wsgi模块加载到apache的问题 [英] Problem of loading mod_wsgi module into apache on Windows 64-bit

查看:27
本文介绍了64位Windows下将mod_wsgi模块加载到apache的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照此说明安装 mod_wsgi 模块.我已经从 这个来源 下载了 mod_wsgi.so.在我将以下行添加到 httpd.conf

I'm trying to install mod_wsgi module followed this instruction. I've downloaded mod_wsgi.so from this source. It seems like apache cannot restart services properly and the page cannot be loaded after I added the following line to httpd.conf

LoadModule wsgi_module modules/mod_wsgi.so

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

I've checked some issues from some sources as follows:

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

环境:

  • Windows Server® Standard FE 64 位
  • WAMP 2.0 上的 Apache 2.2.8
  • 为所有用户安装了 Python 2.7.1

没有加载这个模块,apache 可以正常运行.我的问题是什么?

Without loading this module, apache runs properly. What is my problem?

应用程序错误日志:

[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 位的?

From apache error.log, is it clear that installed apache is 32-bit?

解决方案:将所有内容更改为 64 位.

Soulution: Change everything to 64-bit.

推荐答案

我也遇到过这种情况,Apache 可以在 windows 64 位上运行,但如果加载了 mod_wsgi 就不行了.

I was faced with this situation as well, and Apache would run on windows 64bit, but won't if mod_wsgi is loaded.

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

I found a solution which is pretty simple:

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

总结:一切(apache 和 mod_wsgi)都必须是 64 位的,你才能在 64 位 Windows 上运行 Apache/mod_wsgi.

Summary: Everything (both apache and mod_wsgi) has to be 64bit for you to be able to run Apache/mod_wsgi on a 64-bit windows.

这篇关于64位Windows下将mod_wsgi模块加载到apache的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆