close
Warning:
Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.
- Timestamp:
-
2020-07-23T14:06:24-07:00 (5 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v3
|
v4
|
|
| 11 | 11 | A 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]. |
| 12 | 12 | |
| 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): |
| | 13 | If you are using Trac with multiple projects, you can specify their common parent directory in `trac.wsgi`: |
| 14 | 14 | {{{#!python |
| 15 | 15 | def application(environ, start_request): |
| 16 | | # Add this to config when you have multiple projects |
| | 16 | # Add this when you have multiple projects |
| 17 | 17 | environ.setdefault('trac.env_parent_dir', '/usr/share/trac/projects') |
| 18 | 18 | .. |
| 19 | 19 | }}} |
| | 20 | |
| | 21 | Directories 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. |
| 20 | 22 | |
| 21 | 23 | === A very basic script |
| … |
… |
|
| 413 | 415 | //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.// |
| 414 | 416 | |
| 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 | | |
| 429 | 417 | === Other resources |
| 430 | 418 | |