Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 8 years ago

#1782 closed defect (worksforme)

Allow IIS users to setup Trac for multiple projects

Reported by: markus Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.8.4
Severity: normal Keywords: multiple projecst IIS Windows
Cc: Branch:
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 (1)

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

Download all attachments as: .zip

Change History (3)

by markus, 15 years ago

Attachment: multitrac.diff added

multiple projects on IIS

comment:1 by markus, 15 years ago

Resolution: worksforme
Status: newclosed

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

comment:2 by Christian Boos, 8 years ago

Milestone: 0.9

(clearing report:35)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.