Opened 16 years ago
Closed 15 years ago
#8875 closed defect (fixed)
trac.wsgi does not work with multiple projects
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | high | Milestone: | 0.12.1 |
| Component: | web frontend | Version: | none |
| Severity: | trivial | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
The template for trac.wsgi has a typo (in r8872, never used it before) which breaks the support for multiple projects: tt uses to trac.env_path_parent_dir instead of trac.env_parent_dir leading to an error in trac.web.main when trying to open the environment. This options is also undocumented in the mod_wsgi page.
BTW, the documentation about mod_wsgi support in Trac is very basic. In particular it suggests to define PYTHON_EGG_CACHE where probably it's better to use WSGIPythonEggs in embedded mode or the python-eggs option of daemons. If there is a good reason not to do it, it's probably worth documenting it too…
Attachments (0)
Change History (8)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Component: | general → web frontend |
|---|---|
| Priority: | normal → high |
comment:4 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Patch applied in [8958]. Thanks!
comment:5 by , 16 years ago
| Owner: | changed from to |
|---|
comment:6 by , 15 years ago
The problem seems still present: the same change is required a few lines below (source:trunk/trac/admin/templates/deploy_trac.wsgi#L28).
comment:7 by , 15 years ago
| Milestone: | 0.12 → 0.12.1 |
|---|---|
| Resolution: | fixed |
| Status: | closed → reopened |
Right, my bad. I should have checked more carefully.



My somebody apply this patch to the trunk, this bug is annoying as it requires an edit at each upgrade and IMO is very trivial!
--- lib/python2.4/site-packages/Trac-0.12dev_r8912-py2.4.egg/trac/admin/templates/deploy_trac.wsgi 2009-12-05 09:40:56.000000000 +0100 +++ lib/python2.4/site-packages/Trac-0.12dev_r8912-py2.4.egg/trac/admin/templates/deploy_trac.wsgi.fixed 2009-12-16 08:25:48.000000000 +0100 @@ -17,7 +17,7 @@ import os def application(environ, start_request): - if not 'trac.env_path_parent_dir' in environ: + if not 'trac.env_parent_dir' in environ: environ.setdefault('trac.env_path', '${env.path}') if 'PYTHON_EGG_CACHE' in environ: os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']