Skip to content

Instantly share code, notes, and snippets.

@justinkelly
Created October 19, 2010 01:07
Show Gist options
  • Save justinkelly/633395 to your computer and use it in GitHub Desktop.
Save justinkelly/633395 to your computer and use it in GitHub Desktop.
Trac wsgi file TRAC_ENV_PARENT_DIR
##depengind how you want to structure your trac urls
# WSGIScriptAliasMatch ^/users/([^/]+) /var/trac/trac.wsgi
WSGIScriptAlias /trac /var/trac/trac.wsgi
## If using htpasswd auth you will need
# <Location "/trac/login">
# AuthType Basic
# AuthName "Trac"
# AuthUserFile /home/justin/public_html/bzr.bz/private/trac/.htpasswd
# Require valid-user
# </Location>
import sys
sys.stdout = sys.stderr
import os
os.environ['TRAC_ENV_PARENT_DIR'] = '/var/trac'
os.environ['PYTHON_EGG_CACHE'] = ' /usr/share/pyshared'
import trac.web.main
application = trac.web.main.dispatch_request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment