Changes between Version 5 and Version 6 of TracModWSGI
- Timestamp:
- Feb 21, 2016, 9:52:25 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracModWSGI
v5 v6 80 80 <Directory /usr/local/trac/mysite/apache> 81 81 WSGIApplicationGroup %{GLOBAL} 82 Order deny,allow 83 Allow from all 82 # For Apache 2.2 83 <IfModule !mod_authz_core.c> 84 Order deny,allow 85 Allow from all 86 </IfModule> 87 # For Apache 2.4 88 <IfModule mod_authz_core.c> 89 Require all granted 90 </IfModule> 84 91 </Directory> 85 92 }}} … … 94 101 <Directory /usr/share/trac/cgi-bin> 95 102 WSGIApplicationGroup %{GLOBAL} 96 Order deny,allow 97 Allow from all 103 # For Apache 2.2 104 <IfModule !mod_authz_core.c> 105 Order deny,allow 106 Allow from all 107 </IfModule> 108 # For Apache 2.4 109 <IfModule mod_authz_core.c> 110 Require all granted 111 </IfModule> 98 112 </Directory> 99 113 }}} … … 278 292 See also [trac:TracOnWindows/Advanced]. 279 293 294 === Using CA !SiteMinder Authentication 295 Setup 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 297 RemoteUserVar="WHATEVER_IT_SHOULD_BE" 298 SetRemoteUser="YES" 299 }}} 300 The 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 302 Also add a !LogOffUri parameter to the agent configuration (e.g. `/trac/logout`). 303 304 Then 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`: 305 306 {{{#!python 307 def application(environ, start_request): 308 # Set authenticated username on CA SiteMinder to REMOTE_USER variable 309 # strip() is used to remove any spaces on the end of the string 310 if 'HTTP_SM_USER' in environ: 311 environ['REMOTE_USER'] = environ['HTTP_REMOTE_USER'].strip() 312 ... 313 }}} 314 315 Note: you do not need any Apache "Location" directives. 316 280 317 === Using Apache authentication with the Account Manager plugin's Login form === 281 318 … … 298 335 {{{#!apache 299 336 <Location /authFile> 300 …HTTP authentication configuration…337 # HTTP authentication configuration 301 338 Require valid-user 302 339 </Location> … … 398 435 //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.// 399 436 437 === Missing Headers and Footers 438 439 If python optimizations are enabled, then headers and footers will not be rendered. 440 441 In 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 447 On Ubuntu, the WSGI mod configuration is at `/etc/apache2/mods-enabled/wsgi.conf`. 448 449 NOTE: This is the WSGI equivalent of the same issue that happens with `PythonOptimize On` in [TracModPython#Pagelayoutissues ModPython] (see [trac:#8956]). 450 400 451 === Other resources 401 452