Edgewall Software
Modify

Opened 8 years ago

Last modified 6 years ago

#3249 new enhancement

Default env with parent_dir

Reported by: coderanger@… Owned by: jonas
Priority: low Milestone: next-major-releases
Component: general Version: devel
Severity: normal Keywords:
Cc: coderanger@…
Release Notes:
API Changes:

Description

Attached is a patch to allow for a default environment to be given when using TRAC_ENV_PARENT_DIR. This means that instead of a simple listing, you can have a full Trac at the base of a domain. The logic is simple, though the code may need to be cleaned up a bit. The patch is against a current checkout (r3369 for the file).

Attachments (1)

default_env.patch (3.8 KB) - added by coderanger@… 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by coderanger@…

comment:1 Changed 8 years ago by jonas

  • Priority changed from high to low

Instead of modifying the PATH_INFO and SCRIPT_NAME environment variables it's probably better to do a 302 (MOVED TEMPORARILY) redirect. I'm also not totally convinced that this should be handled by Trac at all, it might be better to let the web-server take care of this.

I'm setting the priority to low since this should not block 0.10.

comment:2 Changed 8 years ago by coderanger@…

There is no way for the webserver to do this, as it doesn't know what paths are valid envs. The reason to not do a redirect is to maintain the idea that there is a normal Trac rooted at the given directory. The whole concept is roughly just being able to give both TRAC_ENV_DIR and TRAC_ENV_PARENT_DIR for the same location.

comment:3 Changed 8 years ago by mgood

The webserver doesn't need to know about the other environments. If you have Trac installed at "/projects" you could redirect "/projects" to "/projects/default". Accesses to the other project paths would be handled normally.

comment:4 Changed 8 years ago by coderanger@…

That won't help for "www.example.com/wiki". If / is configued as a parent_dir, then it will try to find an env named "wiki", instead of figuring out what was meant. The major advantage of this is cosmetic as I want to have my website at / instead of /main.

comment:5 Changed 8 years ago by anonymous

  • Cc coderanger@… added

comment:6 Changed 8 years ago by cboos

  • Milestone changed from 0.10 to 0.11

As there's no consensus on that yet, we should defer the patch to later, 0.11 or 0.10.1 when that milestone gets created.

comment:7 Changed 6 years ago by osimons

  • Milestone changed from 0.11.3 to 0.13

Nor is it likely to be 0.11-stable at this point. Moving it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain jonas.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from jonas to anonymous. Next status will be 'assigned'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.