找不到适用于 apache/windows 的 mod_wsgi
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4268214/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
mod_wsgi not found for apache/windows
提问by kefeizhou
My apache can't locate mod_wsgi on windows. I'm using apache 2.2 and the server starts correctly with the default httpd.conf.
我的 apache 无法在 Windows 上找到 mod_wsgi。我使用的是 apache 2.2,服务器使用默认的 httpd.conf 正确启动。
I placed mod_wsgi.so into apache's modules directory (C:\Program Files\Apache Software Foundation\Apache2.2\modules) with read/execute permission for all users. I added the following line to the default httpd.conf
我将 mod_wsgi.so 放入 apache 的模块目录(C:\Program Files\Apache Software Foundation\Apache2.2\modules),所有用户都具有读取/执行权限。我将以下行添加到默认的 httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so
LoadModule wsgi_module modules/mod_wsgi.so
And i get this error when trying to start apache. Anyone have any ideas/suggestions?
我在尝试启动 apache 时收到此错误。任何人有任何想法/建议?
httpd.exe: Syntax error on line 129 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so into server: The specified module could not be found.
[Tue Nov 23 17:41:55 2010] [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request. : winnt_accept: Asynchronous AcceptEx failed.
[Tue Nov 23 17:41:56 2010] [notice] Child 7384: Released the start mutex
httpd.exe:C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf 第 129 行的语法错误:无法加载 C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_wsgi。所以进入服务器:找不到指定的模块。
[2010 年 11 月 23 日星期二 17:41:55] [警告] (OS 995)由于线程退出或应用程序请求,I/O 操作已中止。: winnt_accept: 异步 AcceptEx 失败。
[Tue Nov 23 17:41:56 2010] [notice] Child 7384:释放了启动互斥锁
回答by Graham Dumpleton
What is the exact name of the mod_wsgi module file that you stuck in modules directory. Did you rename it from what was downloaded? Did you ensure you didn't stick an extra .so in the name so as to get mod_wsgi.so.so? Windows may be hiding one of the extensions if you did do that.
您卡在模块目录中的 mod_wsgi 模块文件的确切名称是什么。您是否从下载的内容中重命名了它?您是否确保没有在名称中添加额外的 .so 以获得 mod_wsgi.so.so?如果您这样做了,Windows 可能会隐藏其中一个扩展。
回答by Ryan Christensen
Another possibility is that Apache 2.2 is installed as 32-bit while Python was installed as 64-bit on a 64-bit machine. I had a situation where anything python mod_wsgi and legacy mod_python apps were erroring. If you are running 32-bit Apache it only likes to find 32-bit Python no matter the version.
另一种可能性是 Apache 2.2 安装为 32 位,而 Python 安装为 64 位机器上的 64 位机器。我遇到过任何 python mod_wsgi 和旧版 mod_python 应用程序出错的情况。如果您运行的是 32 位 Apache,则无论版本如何,它都只喜欢查找 32 位 Python。
回答by Peter
See this pagefor a simple solution. Your apache is most likely a 32bit installed on a 64-bit windows, or otherwise. Or you have a filename mistake. To verify the filename is correct and exists with the extension mentioned: Click the "Tools" menu in any explorer window, Click "Folder Options" then in the "View" tab, uncheck "Hide extensions for known file types" and click [Apply] or [OK]. Then you can proceed after your verification of mod_wsgi.so
请参阅此页面以获取简单的解决方案。您的 apache 很可能是安装在 64 位 Windows 上的 32 位,或者其他。或者你有一个文件名错误。要验证文件名是否正确并且存在所提及的扩展名:单击任何资源管理器窗口中的“工具”菜单,单击“文件夹选项”,然后在“查看”选项卡中,取消选中“隐藏已知文件类型的扩展名”并单击“应用] 或 [确定]。然后您可以在验证后继续mod_wsgi.so