Changes between Version 5 and Version 6 of TracModWSGI


Ignore:
Timestamp:
Mar 10, 2016, 11:15:08 AM (22 months ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v5 v6  
    293293
    294294=== Using CA !SiteMinder Authentication
    295 Setup CA !SiteMinder to protect your Trac login URL (e.g. /trac/login).  Then modify the trac.wsgi script generated using `trac-admin <env> deploy <dir>` to add the following lines, which extract the HTTP_SM_USER variable and set it to REMOTE_USER:
     295Setup CA !SiteMinder to protect your Trac login URL (e.g. `/trac/login`).  Also, make sure the policy is set to include the HTTP_REMOTE_USER variable.  If your site allows it, you can set this in LocalConfig.conf:
     296{{{#!apache
     297RemoteUserVar="WHATEVER_IT_SHOULD_BE"
     298SetRemoteUser="YES"
     299}}}
     300The specific variable is site-dependent.  Ask your site administrator.  If your site does not allow the use of LocalConfig.conf for security reasons, have your site administrator set the policy on the server to set REMOTE_USER.
     301
     302Also add a !LogOffUri parameter to the agent configuration (e.g. `/trac/logout`).
     303
     304Then modify the trac.wsgi script generated using `trac-admin <env> deploy <dir>` to add the following lines, which extract the `HTTP_REMOTE_USER` variable and set it to `REMOTE_USER`:
    296305
    297306{{{#!python
     
    300309    # strip() is used to remove any spaces on the end of the string
    301310    if 'HTTP_SM_USER' in environ:
    302         environ['REMOTE_USER'] = environ['HTTP_SM_USER'].strip()
     311        environ['REMOTE_USER'] = environ['HTTP_REMOTE_USER'].strip()
    303312    ...
    304313}}}
     
    326335{{{#!apache
    327336<Location /authFile>
    328    …HTTP authentication configuration…
     337   # HTTP authentication configuration
    329338   Require valid-user
    330339</Location>
     
    426435//This is not a recommended approach though. See also the notes at the bottom of the [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac mod_wsgi's IntegrationWithTrac] wiki page.//
    427436
     437=== Missing Headers and Footers
     438
     439If python optimizations are enabled, then headers and footers will not be rendered.
     440
     441In your WSGI configuration file, the `WSGIPythonOptimize` setting must be set to `0` as follows (`1` or `2` will not work):
     442
     443{{{#!apache
     444    WSGIPythonOptimize 0
     445}}}
     446
     447On Ubuntu, the WSGI mod configuration is at `/etc/apache2/mods-enabled/wsgi.conf`.
     448
     449NOTE: This is the WSGI equivalent of the same issue that happens with `PythonOptimize On` in [TracModPython#Pagelayoutissues ModPython] (see [trac:#8956]).
     450
    428451=== Other resources
    429452