我正在尝试按照此说明安装 mod_wsgi 模块。我从此源下载了mod_wsgi.so。 后,apache 似乎无法正确重新启动服务并且无法加载页面,
在我将以下行添加到 httpd.conf LoadModule wsgi_module module/mod_wsgi.so
我已经从某些来源检查了一些问题,如下所示:
- 文件名正确 - mod_wsgi.so 而不是 mod_wsgi.so.so
- 文件的权限设置为与正确加载的其他模块相同
- Python 为所有用户安装
环境:
- Windows Server® Standard 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.
从apache error.log,是否清楚安装的apache是32位的?
解决方案:将所有内容更改为 64 位。
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:
- The file name is correct - mod_wsgi.so not mod_wsgi.so.so
- Permissions on the file was set as same as other modules that loaded properly
- Python installed for all users
Environment:
- Windows Server® Standard FE 64-bit
- Apache 2.2.8 on WAMP 2.0
- Python 2.7.1 installed for all users
Without loading this module, apache runs properly. What is my problem?
Application 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.
From apache error.log, is it clear that installed apache is 32-bit?
Soulution: Change everything to 64-bit.
发布评论
评论(3)
我也遇到过这种情况,Apache 可以在 Windows 64 位上运行,但如果加载了 mod_wsgi 就不会运行。
我找到了一个非常简单的解决方案:
如果您从 http://wampserver.com/ 下载并安装,则可以
c:\wamp \bin\apache\Apache2.2.21\modules\
并httpd.conf
并添加一行,例如:LoadModule wsgi_module module/mod_wsgi.so
摘要:一切(apache 和 mod_wsgi)都必须是 64 位才能在 64 位 Windows 上运行 Apache/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:
handled if you download and install from http://wampserver.com/
c:\wamp\bin\apache\Apache2.2.21\modules\
andhttpd.conf
and add a line like:LoadModule wsgi_module modules/mod_wsgi.so
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.
据我了解...
然而,在撰写本文时,有一个家伙至少已经编译了 Apache 2.2.19 x64 供我们使用,您可以下载在这里。
如果你想要一个较新的版本,您必须自己编译它,但这将是一项艰巨的任务!
此外,即使您确实让 Apache x64 在 Windows 上良好运行,您打算对 mod_wsgi 做什么?这就是我决定为此目的创建一个 Arch Linux LAMP 堆栈的原因。我现在工作正常,但由于 Aptana 不与 Django 项目同步,我正在再次研究 Windows 解决方案。
如果您找到好的解决方案,请告诉我!
编辑:我发现 这些 64 位 mod_wsgi 适用于 py2.6 和 2.7,但是我还没有让他们工作。
编辑:是的!我成功了!我的 Apache 服务监视器亮起绿灯,现在显示 Apache/2.2.19 (Win64) mod_wsgi/3.3 Python/2.6.4。我使用 2.6.4 是因为 Autodesk Maya 正在运行该版本,并且我希望保留相同版本以保持一致性。
From what I understand...
However, there is a dude out there who, at the time of writing this, has at least compiled Apache 2.2.19 x64 for us, which you can download here.
If you want a newer version, you'd have to compile it yourself, but that would be quite the undertaking!
Furthermore, even if you do get Apache x64 running nicely on Windows, what do you intend to do about mod_wsgi? This is the very reason I decided to just create an Arch Linux LAMP stack for this very purpose. I have it working fine now, but since Aptana doesn't sync with Django projects I'm looking into the Windows solutions again.
Please, let me know if you find a good solution!
EDIT: I found these 64-bit mod_wsgi's for py2.6 and 2.7, but I have yet to get them working.
EDIT: Yes! I got it working! My Apache Service Monitor has a green light and now says Apache/2.2.19 (Win64) mod_wsgi/3.3 Python/2.6.4. I'm using 2.6.4 because that's what Autodesk Maya is running and I want to keep the same version for consistency.
我在 Windows 2008 服务器上运行 Apache/Mod_wsgi。
Peter 提供的 64 位版本 Apache 的链接已损坏。我找到了一个对我有用的:
http://www.apachelounge.com/download/win64/< /a>
阅读 readme.txt。安装非常简单。
他到 64 位 mod_wsgi 的链接仍然很好:
http://www.lfd。 uci.edu/~gohlke/pythonlibs/#mod_wsgi
我使用了 win-amd64 版本,效果很好,我认为我使用的硬件是 Intel。
我确保 Apache 和 Mod_wsgi 版本与 python 版本匹配。我相信我使用的 mod_wsgi 版本是 3.3。
I got Apache/Mod_wsgi running on a Windows 2008 server.
The link to the 64 bit version of Apache provided by Peter is broken. I found one that worked for me at:
http://www.apachelounge.com/download/win64/
Read the readme.txt. The install is very simple.
His link to the 64 bit mod_wsgi is still good:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
I used an win-amd64 version just fine and I think the hardware I'm on is Intel.
I made sure the Apache and Mod_wsgi versions matched as did the python version. I believe the mod_wsgi version I used was 3.3.