Edgewall Software

Changes between Version 64 and Version 65 of TracModWSGI


Ignore:
Timestamp:
Mar 23, 2015, 4:48:30 AM (9 years ago)
Author:
Ryan J Ollos
Comment:

Reorganize so that users don't need to read the whole section.

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v64 v65  
    77== The `trac.wsgi` script
    88
    9 Trac can be run on top of mod_wsgi with the help of the following application script, which is just a Python file, though usually saved with a `.wsgi` extension.
     9Trac can be run on top of mod_wsgi with the help of an application script, which is just a Python file saved with a `.wsgi` extension.
     10
     11A 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
     13If you are using Trac with multiple projects, you can specify their common parent directory using the `TRAC_ENV_PARENT_DIR` in trac.wsgi:
     14{{{#!python
     15def application(environ, start_request):
     16    # Add this to config when you have multiple projects                                             
     17    environ.setdefault('trac.env_parent_dir', '/usr/share/trac/projects') 
     18    ..
     19}}}
    1020
    1121=== A very basic script
     
    6070
    6171Change it according to the path you installed the Trac libs at.
    62 
    63 === Recommended `trac.wsgi` script
    64 
    65 A somewhat 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.
    66 
    67 If you are using Trac with multiple projects, you can specify their common parent directory using the `TRAC_ENV_PARENT_DIR` in trac.wsgi: ''
    68 
    69 {{{#!python
    70 def application(environ, start_request):
    71     # Add this to config when you have multiple projects                                             
    72     environ.setdefault('trac.env_parent_dir', '/usr/share/trac/projects') 
    73     ..
    74 }}}
    7572
    7673== Mapping requests to the script