Changes between Version 1 and Version 2 of TracModWSGI


Ignore:
Timestamp:
10/26/14 13:01:55 (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v1 v2  
    22
    33
    4 [http://code.google.com/p/modwsgi/ mod_wsgi] is an Apache module for running WSGI-compatible Python applications directly on top of the Apache webserver. The mod_wsgi adapter is written completely in C and provides very good performances.
     4[http://code.google.com/p/modwsgi/ mod_wsgi] is an Apache module for running WSGI-compatible Python applications directly on top of the Apache webserver. The mod_wsgi adapter is written completely in C and provides very good performance.
    55
    66[[PageOutline(2-3,Overview,inline)]]
     
    2424
    2525The `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.
     26
     27On Windows:
     28 - If run under the user's session, the Python Egg cache can be found in `%AppData%\Roaming`, for example:
     29{{{#!python
     30os.environ['PYTHON_EGG_CACHE'] = r'C:\Users\Administrator\AppData\Roaming\Python-Eggs'
     31}}}
     32 - If run under a Window service, you should create a directory for Python Egg cache.
     33{{{#!python
     34os.environ['PYTHON_EGG_CACHE'] = r'C:\Trac-Python-Eggs'
     35}}}
    2636
    2737=== A more elaborate script
     
    7383Here, the script is in a subdirectory of the Trac environment.
    7484
    75 If 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:
     85If you followed the directions [TracInstall#cgi-bin Generating the Trac cgi-bin directory], your Apache configuration file should look like following:
    7686
    7787{{{
     
    171181
    172182For multiple environments, you can use the same `LocationMatch` as described with the previous method.
     183
     184'''Note: `Location` cannot be used inside .htaccess files, but must instead live within the main httpd.conf file. If you are on a shared server, you therefore will not be able to provide this level of granularity. '''
    173185
    174186Don't forget to activate the mod_auth_digest. For example, on a Debian 4.0r1 (etch) system:
     
    308320</Location>
    309321}}}
    310 Note that '''authFile''' need not exist. See the !HttpAuthStore link above for examples where multiple Trac projects are hosted on a server.
     322Note that '''authFile''' need not exist (unless you are using Account Manager older than 0.4). See the !HttpAuthStore link above for examples where multiple Trac projects are hosted on a server.
    311323
    312324=== Example: Apache/mod_wsgi with Basic Authentication, Trac being at the root of a virtual host
     
    388400But it's not necessary to edit the source of Trac, the following lines in `trac.wsgi` will also work:
    389401
    390 {{{
     402{{{#!python
    391403import trac.db.postgres_backend
    392404trac.db.postgres_backend.PostgreSQLConnection.poolable = False
     
    395407or
    396408
    397 {{{
     409{{{#!python
    398410import trac.db.mysql_backend
    399411trac.db.mysql_backend.MySQLConnection.poolable = False
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!