Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#2932 closed enhancement (fixed)

Serve content from a non root url directory

Reported by: rgl@… Owned by: Jonas Borgström
Priority: normal Milestone: 0.10
Component: web frontend/tracd Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Allows you to configure tracd to serve trac environments inside a subdirectory, eg:

http://example.com/trac/project

instead of:

http://example.com/project

To do this, launch tracd with the argument: —base-path /trac

Attachments (2)

tracd-add_base_path.patch (4.8 KB ) - added by rgl@… 19 years ago.
patch that implements this enhancement
tracd-fix_auth.patch (796 bytes ) - added by rgl@… 19 years ago.
Missing authentication patch

Download all attachments as: .zip

Change History (9)

by rgl@…, 19 years ago

Attachment: tracd-add_base_path.patch added

patch that implements this enhancement

comment:1 by Matthew Good, 19 years ago

Milestone: 0.10
Resolution: wontfix
Status: newclosed

What's the justification for this? If the Trac projects are served from a sub-URL then there will be no page at the root, which would be very confusing.

If you can provide some reasons for doing this then the ticket could be reopened, but I can't see what setup would require this.

comment:2 by rgl@…, 19 years ago

Milestone: 0.10
Resolution: wontfix
Status: closedreopened

To have tracd sit behind a proxy (under any subdirectory) we need tracd to do this. eg: how do you make trac appear to the user at http://example.com/projects/myproject? with this patch you can.

comment:3 by coderanger, 19 years ago

Milestone: 0.10
Resolution: wontfix
Status: reopenedclosed

Look at the ProxyPass and ProxyPassReverse for Apache. I am sure there are similar directives for other servers.

comment:4 by rgl@…, 19 years ago

Milestone: 0.10
Resolution: wontfix
Status: closedreopened

coderanger, and why you think I don't known that? FYI, it does not work:

  ProxyPass /trac http://localhost:9090/

Then access using:

  http://localhost/trac/myproject

You will see the trac page, but all links returned by tracd are without the "/trac" prefix, eg:

  http://localhost/myproject/roadmap
  http://localhost/myproject/report
  ...

Also note, that in lighttpd (as of v1.4.11), its not possible to do the equivalent of ProxyPassReverse (and that only works with HTTP headers, not the contents of pages), nor its possible to map arbitrary paths, eg: the equivalent of apache

  ProxyPass /trac http://localhost:9090/

In lighttpd, will proxy to http://localhost:9090/trac/ and not http://localhost:9090/, because its not possible to specify the target directory.

So, please, fix this problem before next release!

comment:5 by Jonas Borgström, 19 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in r3050. Thanks!

by rgl@…, 19 years ago

Attachment: tracd-fix_auth.patch added

Missing authentication patch

comment:6 by rgl@…, 19 years ago

Resolution: fixed
Status: closedreopened

Ops, I missed the authentication part too. See the second attached file.

comment:7 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: reopenedclosed

Second patch applied in [3053]. Thanks!

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 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.