WSGI hacks for Trac

Notice: This plugin is deprecated.


  • Provides a Paste application entry point with some configuration options to run Trac
  • Allows to hook other WSGI apps into trac URL space, re-using trac.ini for PasteDeploy configuration

Bugs/Feature Requests

Existing bugs and feature requests for TracWsgiPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from here.


You can check out TracWsgiPlugin from here using Subversion, or browse the source with Trac.


Run trac with Paste

To run Trac with Paste, put into a PasteDeploy script:

use = egg:WSGITrac#trac
path = /path/to/your/trac/env

To serve all projects from /path/to/trac/env/parent via HTTPS use:

use = egg:WSGITrac#tracs
path = /path/to/trac/env/parent
secure = true

NOTE: REMOTE_USER should be set BEFORE calling WSGITrac. WIKI_VIEW permission is needed to list the project in the index.

Run WSGI webapps inside Trac

To run 'myapp' on and 'thirdapp' on /trac/foobar, put into your trac.ini file:

something = myapp
foobar = config:/path/to/some/paste.ini#thirdapp
use = egg:YourEgg#yourapp

Complete example

Add to your trac.ini the following:

use = egg:WSGITrac#trac
path = %(here)s/..

use = egg:PasteScript#wsgiutils
host =
port = 8080
foobar = egg:FooBar#foobar

Now you can run trac with whatever WSGI server you have (this example uses WSGIUtil server) by issuing:

 $ paster serve /path/to/your/trac.ini

Trac will run on http://localhost:8080. http://localhost:8080/foobar serves the foobar application from FooBar egg

Recent Changes

11608 by rjollos on 2012-05-31 15:02:40
Refs #3966: Part of [11607] - Replaced calls to _open_environment with open_environment.
11607 by rjollos on 2012-05-30 19:48:27
Refs #3966: Fixed incorrect package import (trac.web.main._open_environment existed in Trac 0.10, but does not exist in 0.11).
2323 by martinpaljak on 2007-06-20 15:40:32

Include index.html



Author: martinpaljak
Maintainer: none

Last modified 6 years ago Last modified on May 14, 2017, 3:33:18 PM