繁体   English   中英

Apache错误安装trac / wsgi / python

[英]apache error installing trac / wsgi / python

第一次安装wsgi / trac / python时遇到性能问题。 我们有史以来第一次设置笔迹,并且遇到了一些问题。

据我所知,我在正确的位置安装了组件,我的Apache是​​通过Wamp托管的,而我将使用MySql 5.x作为数据库后端。

当我在Apache配置中禁用WSGI时,Wamp / Apache加载就很好了。 我可以浏览到我的本地主机,phpmyadmin等,没有问题。

但是,当启用WSGI时,我的Apache错误日志显示以下消息,这些消息似乎一直循环播放,我的本地主机从不响应,我的phpmyadmin也没有响应。

我怀疑正在发生一些配置循环,但是我无法告诉您要在哪里寻找所需的指导。

我的Apache配置中还有其他我缺少的东西吗?

ImportError: No module named site 
[Mon Aug 08 10:49:51 2011] [notice] Parent: child process exited with status 1 -- Restarting. 
[Mon Aug 08 10:49:51 2011] [warn] mod_wsgi: Compiled for Python/2.7. 
[Mon Aug 08 10:49:51 2011] [warn] mod_wsgi: Runtime using Python/2.7.2. 
[Mon Aug 08 10:49:51 2011] [notice] Apache/2.2.17 (Win32) mod_wsgi/3.3 Python/2.7.2 PHP/5.3.5 configured -- resuming normal operations 
[Mon Aug 08 10:49:51 2011] [notice] Server built: Oct 18 2010 01:58:12 
[Mon Aug 08 10:49:51 2011] [notice] Parent: Created child process 3116 
[Mon Aug 08 10:49:51 2011] [warn] mod_wsgi: Compiled for Python/2.7. 
[Mon Aug 08 10:49:51 2011] [warn] mod_wsgi: Runtime using Python/2.7.2.
[Mon Aug 08 10:49:51 2011] [notice] Child 3116: Child process is running

谢谢...

当我们安装Python时,注册表是由Windows中的安装程序设置的,因此wsgi应该能够轻松找到Python模块,而无需使用ConfigurationDirectives。

HKLM/Software/PythonHKLM/Software/WOW6432Node/Python

在该注册表中,指定了PythonPath&InstallPath,可从中搜索模块,dll,lib等。

当名为mod_wsgi的apache模块找不到这些目录时,发生以下错误

ImportError: No module named site

因此,通过在apache配置文件中添加以下行,我们指定了Python的dll / lib目录

<IfModule wsgi_module>
WSGIPythonHome pathtoyourpythondllandorlibs
</IfModule>

您可以在http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives中找到有关mod_wsgi的更多ConfigurationDirectives。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM