开发者

apache error installing trac / wsgi / python

开发者 https://www.devze.com 2023-03-26 12:51 出处:网络
I am experiencing a performance issue installing wsgi/trac/python for the first time. We\'re setting up trac for the first time ever and are having some issues.

I am experiencing a performance issue installing wsgi/trac/python for the first time. 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.

When I have WSGI disabled in my Apache configuration, Wamp/Apache loads just f开发者_如何学Goine. I can browse to my localhost, phpmyadmin, and so on, no problems.

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.

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?

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.

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

In that registry PythonPath & InstallPath is specified from where it can search for modules, dlls, libs, etc...

When apache module called mod_wsgi can't find these directories the following error occurs

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

<IfModule wsgi_module>
WSGIPythonHome pathtoyourpythondllandorlibs
</IfModule>

More ConfigurationDirectives of mod_wsgi can be found at http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号