Edgewall Software

Changes between Version 37 and Version 38 of TracModWSGI


Ignore:
Timestamp:
Oct 10, 2011, 4:48:48 PM (13 years ago)
Author:
mrajcok@…
Comment:

give WSGIScriptAlias example matching other documentation

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v37 v38  
    7171}}}
    7272
    73 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 sub-interpreters 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.
     73Here, the script is in a subdirectory of the Trac environment.
     74
     75If you followed the directions [http://trac.edgewall.org/wiki/TracInstall#cgi-bin Generating the Trac cgi-bin directory], your Apache configuration file should look like following:
     76
     77{{{
     78WSGIScriptAlias /trac /usr/share/trac/cgi-bin/trac.wsgi  # or trac.fcgi
     79
     80<Directory /usr/share/trac/cgi-bin>
     81    WSGIApplicationGroup %{GLOBAL}
     82    Order deny,allow
     83    Allow from all
     84</Directory>
     85}}}
     86
     87In 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 sub-interpreters 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.
    7488
    7589To test the setup of Apache, mod_wsgi and Python itself (ie. without involving Trac and dependencies), this simple wsgi application can be used to make sure that requests gets served (use as only content in your `.wsgi` script):