21 | | The {{{TRAC_ENV}}} variable should naturally be the directory for your Trac environment (if you have several Trac environments in a directory, you can also use {{{TRAC_ENV_PARENT_DIR}}} instead), while the {{{PYTHON_EGG_CACHE}}} should be a directory where Python can temporarily extract Python eggs. [[BR]] |
22 | | For clarity, you should give this file a {{{.wsgi}}} extension. You should probably put the file in it's own directory, since you will open up its directory to Apache. |
23 | | You can create a .wsgi files which handles all this for you by running the TracAdmin command {{{deploy}}}. |
| 21 | The {{{ |
| 22 | TRAC_ENV |
| 23 | }}} variable should naturally be the directory for your Trac environment (if you have several Trac environments in a directory, you can also use {{{ |
| 24 | TRAC_ENV_PARENT_DIR |
| 25 | }}} instead), while the {{{ |
| 26 | PYTHON_EGG_CACHE |
| 27 | }}} should be a directory where Python can temporarily extract Python eggs. [[BR]] |
| 28 | For clarity, you should give this file a {{{ |
| 29 | .wsgi |
| 30 | }}} extension. You should probably put the file in it's own directory, since you will open up its directory to Apache. |
| 31 | You can create a .wsgi files which handles all this for you by running the TracAdmin command {{{ |
| 32 | deploy |
| 33 | }}}. |
44 | | Here, the script is in a subdirectory of the Trac environment. In order to let Apache run the script, access to the directory in which the script resides is opened up to all of Apache. Additionally, the {{{WSGIApplicationGroup}}} directive ensures that Trac is always run in the first Python interpreter created by mod_wsgi; this is necessary because the Subversion Python bindings, which are used by Trac, don't always work in other subinterpreters and may cause requests to hang or cause Apache to crash as a result. After adding this configuration, restart Apache, and then it should work. |
| 54 | Here, the script is in a subdirectory of the Trac environment. In order to let Apache run the script, access to the directory in which the script resides is opened up to all of Apache. Additionally, the {{{ |
| 55 | WSGIApplicationGroup |
| 56 | }}} directive ensures that Trac is always run in the first Python interpreter created by mod_wsgi; this is necessary because the Subversion Python bindings, which are used by Trac, don't always work in other subinterpreters and may cause requests to hang or cause Apache to crash as a result. After adding this configuration, restart Apache, and then it should work. |