简体   繁体   English

Apache错误安装trac / wsgi / python

[英]apache error installing trac / wsgi / python

I am experiencing a performance issue installing wsgi/trac/python for the first time. 第一次安装wsgi / trac / python时遇到性能问题。 We're setting up trac for the first time ever and are having some issues. 我们有史以来第一次设置笔迹,并且遇到了一些问题。

As far as I know I've got the components setup in the right places, my Apache is hosted via Wamp, and I will be using MySql 5.x for the database back end. 据我所知,我在正确的位置安装了组件,我的Apache是​​通过Wamp托管的,而我将使用MySql 5.x作为数据库后端。

When I have WSGI disabled in my Apache configuration, Wamp/Apache loads just fine. 当我在Apache配置中禁用WSGI时,Wamp / Apache加载就很好了。 I can browse to my localhost, phpmyadmin, and so on, no problems. 我可以浏览到我的本地主机,phpmyadmin等,没有问题。

However, When WSGI enabled, my Apache error log shows the following messages, which keep looping forever it seems, my localhost never responds, nor does my phpmyadmin. 但是,当启用WSGI时,我的Apache错误日志显示以下消息,这些消息似乎一直循环播放,我的本地主机从不响应,我的phpmyadmin也没有响应。

I suspect there is some configuration loop going on, but I couldn't tell you where and need some guidance what to look for. 我怀疑正在发生一些配置循环,但是我无法告诉您要在哪里寻找所需的指导。

Is there something else in our Apache configuration that I am missing? 我的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

Thank you... 谢谢...

When we install Python a registry is set by its installer in Windows so wsgi should be able to find Python modules easily without using ConfigurationDirectives. 当我们安装Python时,注册表是由Windows中的安装程序设置的,因此wsgi应该能够轻松找到Python模块,而无需使用ConfigurationDirectives。

HKLM/Software/Python OR HKLM/Software/WOW6432Node/Python HKLM/Software/PythonHKLM/Software/WOW6432Node/Python

In that registry PythonPath & InstallPath is specified from where it can search for modules, dlls, libs, etc... 在该注册表中,指定了PythonPath&InstallPath,可从中搜索模块,dll,lib等。

When apache module called mod_wsgi can't find these directories the following error occurs 当名为mod_wsgi的apache模块找不到这些目录时,发生以下错误

ImportError: No module named site

So by adding the following line in apache config file we are specifying the directories of dll/lib of Python 因此,通过在apache配置文件中添加以下行,我们指定了Python的dll / lib目录

<IfModule wsgi_module>
WSGIPythonHome pathtoyourpythondllandorlibs
</IfModule>

More ConfigurationDirectives of mod_wsgi can be found at http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives 您可以在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