我正在尝试按照此instruction安装mod_wsgi模块。我从this source下载了mod_wsgi.so。似乎apache无法正常重启服务,并且在将以下行添加到httpd.conf之后无法加载页面
LoadModule wsgi_module modules/mod_wsgi.so
我从一些来源检查了一些问题如下:
环境:
不加载此模块,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位吗?
Soulution:将所有内容更改为64位。
答案 0 :(得分:7)
我也遇到过这种情况,Apache会在Windows 64bit上运行,但如果加载mod_wsgi则不会。
我找到了一个非常简单的解决方案:
c:\wamp\bin\apache\Apache2.2.21\modules\
和httpd.conf
并添加如下行:LoadModule wsgi_module modules/mod_wsgi.so
总结:Everything(apache和mod_wsgi)必须是64位才能在64位窗口上运行Apache / mod_wsgi。
答案 1 :(得分:3)
据我所知......
Currently no official 64bit versions of Apache and PHP exists for Microsoft Windows.
但是,有一个家伙在撰写本文时至少为我们编制了Apache 2.2.19 x64,你可以download here.
如果你想要一个更新的版本,你必须自己编译,但这将是一项艰巨的任务!
此外,即使您做让Apache x64在Windows上运行良好,您打算如何处理mod_wsgi?这就是为什么我决定为此目的创建一个Arch Linux LAMP堆栈的原因。我现在工作正常,但由于Aptana不与Django项目同步,我再次研究Windows解决方案。
如果你找到一个好的解决方案,请告诉我!
编辑:我找到了these 64-bit mod_wsgi's for py2.6 and 2.7,但我还没有让他们工作。 编辑:是的!我搞定了!我的Apache服务监视器有一个绿灯,现在说Apache / 2.2.19(Win64)mod_wsgi / 3.3 Python / 2.6.4。我正在使用2.6.4,因为这就是Autodesk Maya正在运行的东西,我希望保持相同版本的一致性。答案 2 :(得分:3)
我在Windows 2008服务器上运行了Apache / Mod_wsgi。
Peter提供的64位Apache版本的链接已损坏。我找到了一个适合我的地方:
http://www.apachelounge.com/download/win64/
阅读readme.txt。安装非常简单。
他对64位mod_wsgi的链接仍然很好:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
我使用了win-amd64版本就好了,我认为我所使用的硬件是英特尔。
我确保Apache和Mod_wsgi版本与python版本匹配。我相信我使用的mod_wsgi版本是3.3。