Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Oct 26, 2014, 6:01:55 PM (9 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
2 | 2 | |
3 | 3 | |
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. |
5 | 5 | |
6 | 6 | [[PageOutline(2-3,Overview,inline)]] |
… |
… |
|
24 | 24 | |
25 | 25 | 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. |
| 26 | |
| 27 | On Windows: |
| 28 | - If run under the user's session, the Python Egg cache can be found in `%AppData%\Roaming`, for example: |
| 29 | {{{#!python |
| 30 | os.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 |
| 34 | os.environ['PYTHON_EGG_CACHE'] = r'C:\Trac-Python-Eggs' |
| 35 | }}} |
26 | 36 | |
27 | 37 | === A more elaborate script |
… |
… |
|
73 | 83 | Here, the script is in a subdirectory of the Trac environment. |
74 | 84 | |
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: |
| 85 | If you followed the directions [TracInstall#cgi-bin Generating the Trac cgi-bin directory], your Apache configuration file should look like following: |
76 | 86 | |
77 | 87 | {{{ |
… |
… |
|
171 | 181 | |
172 | 182 | For 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. ''' |
173 | 185 | |
174 | 186 | Don't forget to activate the mod_auth_digest. For example, on a Debian 4.0r1 (etch) system: |
… |
… |
|
308 | 320 | </Location> |
309 | 321 | }}} |
310 | | Note that '''authFile''' need not exist. See the !HttpAuthStore link above for examples where multiple Trac projects are hosted on a server. |
| 322 | Note 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. |
311 | 323 | |
312 | 324 | === Example: Apache/mod_wsgi with Basic Authentication, Trac being at the root of a virtual host |
… |
… |
|
388 | 400 | But it's not necessary to edit the source of Trac, the following lines in `trac.wsgi` will also work: |
389 | 401 | |
390 | | {{{ |
| 402 | {{{#!python |
391 | 403 | import trac.db.postgres_backend |
392 | 404 | trac.db.postgres_backend.PostgreSQLConnection.poolable = False |
… |
… |
|
395 | 407 | or |
396 | 408 | |
397 | | {{{ |
| 409 | {{{#!python |
398 | 410 | import trac.db.mysql_backend |
399 | 411 | trac.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!