|
Loading...
|
modwsgi@googlegroups.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: [modwsgi] Problem getting it to work with trac Graham Dumpleton Tue Mar 15 21:00:26 2011
BTW, why are you adding '/usr/local/lib/python2.7/site-packages' to sys.path.
If you are using Python from /usr/local that shouldn't be necessary.
If you are adding it as a way of forcing Python to use that directory
because otherwise doesn't find it, then you are likely mixing multiple
Python installations.
Do check in:
http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Shared_Library
http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Installation_In_Use
to verify what Python version is being used. Post the results here so can see.
Graham
On 15 March 2011 22:23, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> On 15 March 2011 21:59, Drawknob <[EMAIL PROTECTED]> wrote:
>> Hello everyone, I really hope you guys can help as I can't figure this
>> out.
>>
>> I installed trac 0.12 on OpenSUSE 11.4 (upgrade) over an existing
>> installation and project, and changed from cgi to wsgi, and I'm having
>> a problem with getting to work this as vhost. Testing with tracd
>> works so it doesn't seem trac is the problem. apache doesn't seem to
>> be the problem either since other vhosts (such as svn) work. This is
>> what makes me wonder whether this could be a modwsgi problem. The
>> error I'm getting in the log file for the trac vhost is this:
>>
>> Traceback (most recent call last):
>> File "/srv/trac/cgi-bin/trac.wsgi", line 26, in <module>
>> import trac.web.main
>> IOError: zipimport: can not open file /usr/local/lib/python2.7/site-
>> packages/Trac-0.12.2-py2.7.egg
>
> Double check what are the ownership/permissions on the file.
>
> ls -las /usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg
>
> Also check ALL directory permissions down to that point. Must be
> readable/searchable to Apache user.
>
> Also double check permissions on egg cache directory:
>
> ls -las /srv/trac/.egg-cache
>
> You might also try reinstall the Trac egg in case it is corrupt.
>
> Graham
>
>> The file is present and I changed its owner to the user apache uses
>> but no good. I don't understand why I'm not getting this error when I
>> run tracd, so it doesn't seem to be a trac error.
>>
>> I tried both the automatically generated wsgi script and the following
>> one:
>>
>> import site
>> site.addsitedir('/usr/local/lib/python2.7/site-packages')
>> import os
>> os.environ['TRAC_ENV'] = '/srv/trac'
>> os.environ['PYTHON_EGG_CACHE'] = '/srv/trac/.egg-cache'
>> import trac.web.main
>> def application(environ, start_response):
>> environ['trac.env_path'] = '/srv/trac'
>> return trac.web.main.dispatch_request
>>
>> These whole /srv/trac is user wwwrun and group www so apache should
>> have full access.
>>
>> And here's the vhost's .conf file:
>>
>> <VirtualHost *:80>
>> ServerName trac.lan.mycompany.com
>> ServerAlias trac trac.lan
>>
>> # Logging
>> LogLevel warn
>> ErrorLog /var/log/apache2/trac.lan.mycompany.com-error_log
>> CustomLog /var/log/apache2/trac.lan.mycompany.com-access_log
>> combined
>>
>> # Rewrite all other domains to trac.lan.mycompany.com
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} !^trac\.lan\.mycompany\.com
>> RewriteRule ^(.*) http://trac.lan.mycompany.com$1 [L,R=301]
>>
>> DocumentRoot "/srv/trac/htdocs/"
>> ErrorDocument 500 "Don't panic. Have a beer. Call your parents. The
>> server has encountered a temporary error. Wait a minute, reload the
>> page, and everything should be fine. If not, then tell someone."
>> ErrorDocument 401 default
>>
>> WSGIScriptAlias / /srv/trac/cgi-bin/trac.wsgi/
>> <Directory /srv/trac/cgi-bin>
>> WSGIApplicationGroup %{GLOBAL}
>> # AllowOverride None
>> # Order allow,deny
>> Order deny,allow
>> Allow from all
>> </Directory>
>>
>> <Location "/login">
>> AuthType basic
>> AuthName "MyTrac"
>> AuthBasicProvider external
>> AuthExternal pwauth
>> GroupExternal unixgroup
>> Require valid-user
>> </Location>
>> AddExternalAuth pwauth /usr/bin/pwauth
>> SetExternalAuthMethod pwauth pipe
>> AddExternalGroup unixgroup /usr/bin/unixgroup
>> SetExternalGroupMethod unixgroup environment
>> </VirtualHost>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "modwsgi" group.
>> 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.
>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
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.
- [modwsgi] Problem getting it to work with trac Drawknob 2011/03/15
- Re: [modwsgi] Problem getting it to work with trac Graham Dumpleton 2011/03/15
- Re: [modwsgi] Problem getting it to work with trac Graham Dumpleton 2011/03/15 <=
- [modwsgi] Re: Problem getting it to work with trac Drawknob 2011/03/16