I was using .11 on OpenSUSE 11.1, and recently upgraded the distro to 11.4
and then things broke.  Installed .12 and did the upgrade command and in the
apache2 vhost I changed from CGI to WSGI.  Now, apache runs fine (vhosts
such as svn have no issue), and trac runs fine with tracd.  However, the
vhost doesn't work.  Here's the error when I try to access trac from a
browser:

[Mon Mar 14 23:11:52 2011] [error] [client 172.16.1.104] mod_wsgi
(pid=7289): Exception occurred processing WSGI script
'/srv/trac/cgi-bin/trac.wsgi'.
[Mon Mar 14 23:11:52 2011] [error] [client 172.16.1.104] Traceback (most
recent call last):
[Mon Mar 14 23:11:52 2011] [error] [client 172.16.1.104]   File
"/srv/trac/cgi-bin/trac.wsgi", line 30, in application
[Mon Mar 14 23:11:52 2011] [error] [client 172.16.1.104]     from
trac.web.main import dispatch_request
[Mon Mar 14 23:11:52 2011] [error] [client 172.16.1.104] IOError: zipimport:
can not open file
/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg


Here's my /srv/trac contents:

drwxr-x--- 9 root   www  4096 Mar 12 04:07 ./
drwxr-xr-x 6 root   root 4096 Feb 18 13:35 ../
drwxr-xr-x 5 wwwrun www  4096 Mar 12 03:52 .egg-cache/
-rw-r--r-- 1 root   root   98 Apr 18  2009 README
-rw-r--r-- 1 root   root   27 Apr 18  2009 VERSION
drwxr-xr-x 2 wwwrun www  4096 Apr 26  2009 cgi-bin/
drwxr-xr-x 2 root   root 4096 Apr 21  2010 conf/
drwxrwx--- 2 root   root 4096 Oct  1 18:06 db/
drwxr-xr-x 3 wwwrun www  4096 Jun 22  2009 htdocs/
drwxr-xr-x 2 root   root 4096 Apr 18  2009 log/
drwxr-xr-x 2 root   root 4096 Apr 18  2009 plugins/

This has the sole trac project I'm doing.


And here's my vhost .conf:

<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. I$
  ErrorDocument 401 default

WSGIScriptAlias / /srv/trac/cgi-bin/trac.wsgi/
   <Directory /srv/trac/>
    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>


Help!
-- 
View this message in context: 
http://old.nabble.com/zipimport-fails-to-open-main-Trac-.egg-tp31151370p31151370.html
Sent from the Trac Users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en.

Reply via email to