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)
Change History (8)
by , 18 years ago
Attachment: | tracd_server_url_root.patch added |
---|
comment:1 by , 18 years ago
Type: | defect → enhancement |
---|
guess this is really an enhancement, not a defect
comment:2 by , 18 years ago
Milestone: | → 0.10 |
---|---|
Owner: | changed from | to
comment:3 by , 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 , 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.
comment:5 by , 18 years ago
Status: | new → assigned |
---|
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 , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ok, patch committed in r3733.
patch to enable serving project from tracd off of the url root