2014-01-10 45 views
0

我试图将我的项目从开发服务器移动到Apache服务器。如果尝试加载mod_wsgi,Apache服务器不会启动

我在Windows 8.1 x64的机器上运行和Python 2.7

我安装了Apache 2.2.25 x86和一切正常,服务器处于活动状态;然后我下载了预编译的mod_wsgi-3.4.ap22.win32-py2.7(x86版本以匹配Apache的版本)。

我将mod_wsgi.so移动到Apache安装的modules文件夹中,并在httpd config中添加了这一行:LoadModule wsgi_module modules/mod_wsgi.so;然后,当我试图重新启动失败离开这个错误日志服务器:

[Fri Jan 10 18:53:18 2014] [notice] Parent: Received restart signal -- Restarting the server. 
[Fri Jan 10 18:53:18 2014] [notice] Child 9772: Exit event signaled. Child process is ending. 
httpd.exe: Syntax error on line 130 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files (x86)/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so into server: **Impossible to find the specified module** 
[Fri Jan 10 18:53:18 2014] [warn] (OS 995)**I/O operation terminated because of the thread's exit or the application's request.** : winnt_accept: Asynchronous AcceptEx failed. 
[Fri Jan 10 18:53:19 2014] [notice] Child 9772: Released the start mutex 
[Fri Jan 10 18:53:20 2014] [notice] Child 9772: All worker threads have exited. 
[Fri Jan 10 18:53:20 2014] [notice] Child 9772: Child process is exiting 

注:加粗(**)的部分,其中在我的母语,我只是翻译它们。

我确定该模块实际上被称为mod_wsgi.so,所以我不能真正看到问题出在哪里。

编辑:发现问题。 Python(以及因此MySQL pyton mod)是x64而不是x86。安装了正确的版本,它工作得很好。

回答

0

的关键似乎是这样的:

Cannot load C:/Program Files (x86)/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so into server: **Impossible to find the specified module** 

这似乎很清楚。该文件不存在于您的服务器上,或者如果存在,Apache将无法读取它。每个人都可以阅读吗?