Hello,
Please let me start by saying that I am a Python, Apache, and wsgi newbe.
I have been at this for a couple of days and getting nowhere. Any help
would be greatly appreciated!
I am attempting to get trac running with apache2 on linux 6.2 using python
2.6.6. I have downloaded, compiled, and loaded mod_wsgi-3.3. Note: I can
successfully run the hello.wsgi script from a python command line. It
seems like my /usr/lib/python2.6/site-packages are not getting loaded from
the Apache2 mod_wsgi? I have done a chmod -R 777 to
/usr/lib/python2.6/site-packages and '/opt/trac/projects.
When I attempt to access http:/myhostname/trac I get the following error in
the apache error.log:
[Mon Jul 02 07:51:59 2012] [notice] Apache/2.2.15 (Unix) DAV/2 SVN/1.6.11
mod_wsgi/3.3 Python/2.6.6 configured -- resuming normal operations
[Mon Jul 02 07:52:03 2012] [error] [client ::1] mod_wsgi (pid=7865): Target
WSGI script '/opt/trac/projects/ehawah/apache/hello.wsgi' cannot be loaded
as Python module.
[Mon Jul 02 07:52:03 2012] [error] [client ::1] mod_wsgi (pid=7865):
Exception occurred processing WSGI script
'/opt/trac/projects/ehawah/apache/hello.wsgi'.
[Mon Jul 02 07:52:03 2012] [error] [client ::1] Traceback (most recent call
last):
[Mon Jul 02 07:52:03 2012] [error] [client ::1] File
"/opt/trac/projects/ehawah/apache/hello.wsgi", line 16, in <module>
[Mon Jul 02 07:52:03 2012] [error] [client ::1] import trac.web.main
[Mon Jul 02 07:52:03 2012] [error] [client ::1] ImportError: No module
named trac.web.main
My httpd.conf looks like this:
WSGIScriptAlias /trac /opt/trac/projects/ehawah/apache/hello.wsgi
<Directory /opt/trac/projects/ehawah/apache>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
My /opt/trac/projects/ehawah/apache/hello.wsgi script contains the
following:
import sys
import site
import os
file1 = open('/tmp/mpw.out', 'w', 0)
sys.stdout = file1
sys.stderr = file1
print sys.version_info
print 'mpw - sys.path1'
print sys.path
os.environ['TRAC_ENV'] = '/opt/trac/projects/ehawah'
os.environ['PYTHON_EGG_CACHE'] = '/opt/trac/projects/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
Any help would be greatly appreciated!
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/modwsgi/-/4uoleRDl5QkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.