Edgewall Software

Ticket #3249 (new enhancement)

Opened 2 years ago

Last modified 2 months ago

Default env with parent_dir

Reported by: coderanger@… Owned by: jonas
Priority: low Milestone: 0.13
Component: general Version: devel
Severity: normal Keywords:
Cc: coderanger@…

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

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

Change History

Changed 2 years ago by coderanger@…

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

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

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

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

Changed 2 years ago by anonymous

  • cc coderanger@… added

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

Changed 2 months 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.

Add/Change #3249 (Default env with parent_dir)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from jonas. Next status will be 'new'
The owner will change from jonas to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.