Changes between Version 5 and Version 6 of TracModWSGI


Ignore:
Timestamp:
Aug 24, 2019, 7:16:43 AM (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v5 v6  
    1111A robust and generic version of this file can be created using the `trac-admin <env> deploy <dir>` command which automatically substitutes the required paths, see TracInstall#cgi-bin. The script should be sufficient for most installations and users not wanting more information can proceed to [#Mappingrequeststothescript configuring Apache].
    1212
    13 If you are using Trac with multiple projects, you can specify their common parent directory using the `TRAC_ENV_PARENT_DIR` in trac.wsgi (note that this directory should contain //only// Trac environments, no other sub-directories):
     13If you are using Trac with multiple projects, you can specify their common parent directory in `trac.wsgi`:
    1414{{{#!python
    1515def application(environ, start_request):
    16     # Add this to config when you have multiple projects
     16    # Add this when you have multiple projects
    1717    environ.setdefault('trac.env_parent_dir', '/usr/share/trac/projects') 
    1818    ..
    1919}}}
     20
     21Directories residing in `trac.env_parent_dir` that are not environment directories will display an error message on the [TracInterfaceCustomization#ProjectList project index page]. The directories can be excluded by listing them in a `.tracignore` file residing in `trac.env_parent_dir`. Unix [https://docs.python.org/2/library/fnmatch.html shell-style wildcard patterns] can be used in the newline separated list of directories.
    2022
    2123=== A very basic script
     
    413415//This is not a recommended approach though. See also the notes at the bottom of the [https://code.google.com/archive/p/modwsgi/wikis/IntegrationWithTrac.wiki mod_wsgi's IntegrationWithTrac] wiki page.//
    414416
    415 === Missing Headers and Footers
    416 
    417 If python optimizations are enabled, then headers and footers will not be rendered. An error will be raised in Trac 1.0.11 and later when optimizations are enabled.
    418 
    419 In your WSGI configuration file, the `WSGIPythonOptimize` setting must be set to `0` (`1` or `2` will not work):
    420 
    421 {{{#!apache
    422     WSGIPythonOptimize 0
    423 }}}
    424 
    425 On Ubuntu, the WSGI mod configuration is at `/etc/apache2/mods-enabled/wsgi.conf`.
    426 
    427 The same issue is seen with `PythonOptimize On` in [TracModPython#Pagelayoutissues ModPython].
    428 
    429417=== Other resources
    430418