Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3506 closed enhancement (fixed)

PATCH: Allow tracd to serve projects from the URL root

Reported by: pacopablo Owned by: Matthew Good
Priority: normal Milestone: 0.10
Component: web frontend/tracd Version: devel
Severity: normal Keywords:
Cc: pacopablo@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

With external webservers, it is possible to configure Trac such that it is served from the root URL. However, tracd will always display a project listing, even if only one project is beign served.

This request has come up on the mailing list previously. The response from Matt Good was that another option should be provided to tracd.

Attached is a patch that provides the --serve-root option. If specified, then it will not show a project list and simply serve the project listed.

I'll admit that my approach might not be the best. However, I couldn't think of a better way to get the necessary info to the required objects. So any feedback on the patch is very welcome.

Attachments (2)

tracd_server_url_root.patch (2.3 KB ) - added by pacopablo 18 years ago.
patch to enable serving project from tracd off of the url root
tracd_single_env.patch (3.7 KB ) - added by Matthew Good 18 years ago.
change option to —single-env

Download all attachments as: .zip

Change History (8)

by pacopablo, 18 years ago

Attachment: tracd_server_url_root.patch added

patch to enable serving project from tracd off of the url root

comment:1 by pacopablo, 18 years ago

Type: defectenhancement

guess this is really an enhancement, not a defect

comment:2 by Matthew Good, 18 years ago

Milestone: 0.10
Owner: changed from Jonas Borgström to Matthew Good

comment:3 by anonymous, 18 years ago

When using the —serve-root option, I'm getting the following traceback…

  File "D:\Installs\trac-trunk\trac\web\main.py", line 335, in dispatch_request
    dispatcher.dispatch(req)
  File "D:\Installs\trac-trunk\trac\web\main.py", line 220, in dispatch
    resp = chosen_handler.process_request(req)
  File "D:\Installs\trac-trunk\trac\web\auth.py", line 95, in process_request
    self._do_login(req)
  File "D:\Installs\trac-trunk\trac\web\auth.py", line 116, in _do_login
    assert req.remote_user, 'Authentication information not available.'
AssertionError: Authentication information not available.

comment:4 by pacopablo, 18 years ago

Slight side effect of patch. Because there is no "project" part of the path, one needs to use * as the project name. So:

tracd --auth *,/path/to/htdigest,realm --serve-root /path/to/trac/env

Should do it.

by Matthew Good, 18 years ago

Attachment: tracd_single_env.patch added

change option to —single-env

comment:5 by Matthew Good, 18 years ago

Status: newassigned

I've attached a new version of the patch which renames the option to --single-env (or -s) and avoids using the WSGI environment for passing the "serveroot" option around. It also fixes the problem with the authentication pacopablo mentioned.

I'll bring this up on the MailingList, since we were trying to establish a feature freeze for 0.10.

comment:6 by Matthew Good, 18 years ago

Resolution: fixed
Status: assignedclosed

Ok, patch committed in r3733.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good 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.