Edgewall Software
Modify

Ticket #1782 (closed defect: worksforme)

Opened 7 years ago

Last modified 6 years ago

Allow IIS users to setup Trac for multiple projects

Reported by: markus Owned by: jonas
Priority: normal Milestone: 0.9
Component: general Version: 0.8.4
Severity: normal Keywords: multiple projecst IIS Windows
Cc:
Release Notes:
API Changes:

Description

Although "real" support for multiple projects (like scheduled for milestone:2.0) will be a big step forward the way described in TracMultipleProjects satisfies most needs.
Unfortunately setting up different TRAC_ENVs for several locations isn't possible with IIS (IIS doesn't pass the environment variable correctly anyway).
Therefore my question is if we could already pass env_path from trac.cgi to cgi_frontend.open_environment (see patch).
In this case IIS users could set up a virtual host for every project and let it point to a path inside trac's home directory, say C:\Program Files\Python\share\trac\proj1, ..\proj2, etc. In these project directories you'd only have to copy your customized trac.cgi (with corresponding TRAC_ENV).
This patch should not affect Apache users at all but it should give IIS users the opportunity to use Trac with multiple projects!

Attachments

multitrac.diff (936 bytes) - added by markus 7 years ago.
multiple projects on IIS

Download all attachments as: .zip

Change History

Changed 7 years ago by markus

multiple projects on IIS

comment:1 Changed 7 years ago by markus

  • Resolution set to worksforme
  • Status changed from new to closed

I realized that there's an easier way; there's no need for the patch if you change your trac.cgi to:

import os

try:
    from trac.web import cgi_frontend
    os.environ['TRAC_ENV'] = 'C:...'
    # or
    os.environ['TRAC_ENV_PARENT_DIR'] = 'C:...'
    os.environ['TRAC_ENV_INDEX_TEMPLATE'] = 'C:...'
    os.environ['TRAC_TEMPLATE_VARS'] = 'html_common=/trac'
    cgi_frontend.run()

Obvious, huh? :-p

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.