Changes between Version 2 and Version 3 of TracModWSGI


Ignore:
Timestamp:
09/24/12 18:52:15 (13 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v2 v3  
    276276}}}
    277277
    278 Using the above, usernames in Trac will be of the form `DOMAIN\\username`, so
     278Using the above, usernames in Trac will be of the form `DOMAIN\username`, so
    279279you may have to re-add permissions and such. If you do not want the domain to
    280280be part of the username, set `SSPIOmitDomain On` instead.
     
    360360''Note: using mod_wsgi 2.5 and Python 2.6.1 gave an Internal Server Error on my system (Apache 2.2.11 and Trac 0.11.2.1). Upgrading to Python 2.6.2 (as suggested [http://www.mail-archive.com/modwsgi@googlegroups.com/msg01917.html here]) solved this for me[[BR]]-- Graham Shanks''
    361361
     362If you plan to use `mod_wsgi` in embedded mode on Windows or with the MPM worker on Linux, then you'll even need version 0.3.4 or greater (see [trac:#10675] for details).
     363
    362364=== Getting Trac to work nicely with SSPI and 'Require Group' ===
    363 If like me you've set Trac up on Apache, Win32 and configured SSPI, but added a 'Require group' option to your apache configuration, then the SSPIOmitDomain option is probably not working.  If its not working your usernames in trac are probably looking like 'DOMAIN\\user' rather than 'user'.
     365If like me you've set Trac up on Apache, Win32 and configured SSPI, but added a 'Require group' option to your apache configuration, then the SSPIOmitDomain option is probably not working.  If its not working your usernames in trac are probably looking like 'DOMAIN\user' rather than 'user'.
    364366
    365367This WSGI script 'fixes' things, hope it helps:
     
    372374
    373375def application(environ, start_response):
    374     if "\\\\" in environ['REMOTE_USER']:
    375         environ['REMOTE_USER'] = environ['REMOTE_USER'].split("\\\\", 1)[1]
     376    if "\\" in environ['REMOTE_USER']:
     377        environ['REMOTE_USER'] = environ['REMOTE_USER'].split("\\", 1)[1]
    376378    return trac.web.main.dispatch_request(environ, start_response)
    377379}}}
     
    391393}}}
    392394
     395or
     396
     397{{{
     398import trac.db.mysql_backend
     399trac.db.mysql_backend.MySQLConnection.poolable = False
     400}}}
     401
    393402Now Trac drops the connection after serving a page and the connection count on the database will be kept minimal.
    394403
     
    397406=== Other resources
    398407
    399 For more troubleshooting tips, see also the [TracModPython#Troubleshooting mod_python troubleshooting] section, as most Apache-related issues are quite similar, plus discussion of potential [http://code.google.com/p/modwsgi/wiki/ApplicationIssues application issues] when using mod_wsgi.
     408For more troubleshooting tips, see also the [TracModPython#Troubleshooting mod_python troubleshooting] section, as most Apache-related issues are quite similar, plus discussion of potential [http://code.google.com/p/modwsgi/wiki/ApplicationIssues application issues] when using mod_wsgi. The wsgi page also has a [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac Integration With Trac] document.
    400409
    401410