Mailing List Archive

Redirect from http://hostname/trac/ tohttp://hostname/cgi-bin/trac.cgi
This did not work, for various reasons (including losing the location
settings and not being able to see the css files, etc.)

Thanks anyhow!

Cheers,

:D

--------------------------------------------------------------------
Daragh Fitzpatrick Daragh@UChicago.edu (773) 702-8976

Solutions Architect NSIT Administrative Systems
Renewal Projects and Architecture University of Chicago
--------------------------------------------------------------------
-----Original Message-----
From: trac-bounces@bobcat.edgewall.com
[mailto:trac-bounces@bobcat.edgewall.com] On Behalf Of Christopher Lenz
Sent: Wednesday, May 19, 2004 9:53 AM
To: trac@bobcat.edgewall.com
Subject: Re: [Trac] Redirect from http://hostname/trac/
tohttp://hostname/cgi-bin/trac.cgi

Am 19.05.2004 um 16:20 schrieb Daragh Fitzpatrick:
> Has anyone done a redirect so that http://hostname/trac/ will cause
> http://hostname/cgi-bin/trac.cgi to be loaded?

If you're using Apache, you don't need a redirect at all. Just add a

ScriptAlias /trac "/your/local/path/to/trac.cgi"

This way the client never actually see the trac.cgi in the URL.

Cheers,
Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de

_______________________________________________
Trac mailing list
Trac@lists.edgewall.com
http://lists.edgewall.com/mailman/listinfo/trac
Redirect from http://hostname/trac/ tohttp://hostname/cgi-bin/trac.cgi [ In reply to ]
On Wed, May 19, 2004 at 10:18:03AM -0500, Daragh Fitzpatrick wrote:
>
> This did not work, for various reasons (including losing the location
> settings and not being able to see the css files, etc.)

The CSS file location, etc. is /trac by default, but can be changed,
for example:

Alias /trac/common /System/Library/Frameworks/Python.framework/Versions/Current/share/trac/htdocs

Then you'd need to have in your trac.ini:

[trac]
htdocs_location = /trac/common/

--
=Nicholas Riley <njriley@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
Redirect from http://hostname/trac/ tohttp://hostname/cgi-bin/trac.cgi [ In reply to ]
Thanks! I tried this as soon as I got it, and couldn't get it to work by
tweaking it since, and it doesn't matter THAT much right now.

Maybe a consideration for the next version?

Cheers,

:D

--------------------------------------------------------------------
Daragh Fitzpatrick Daragh@UChicago.edu (773) 702-8976

Solutions Architect NSIT Administrative Systems
Renewal Projects and Architecture University of Chicago
--------------------------------------------------------------------
-----Original Message-----
From: trac-bounces@bobcat.edgewall.com
[mailto:trac-bounces@bobcat.edgewall.com] On Behalf Of Daniel Lundin
Sent: Wednesday, May 19, 2004 10:09 AM
To: trac@bobcat.edgewall.com
Subject: Re: [Trac] Redirect from http://hostname/trac/
tohttp://hostname/cgi-bin/trac.cgi

On Wednesday 19 May 2004 10:20 am, Daragh Fitzpatrick wrote:
> Has anyone done a redirect so that http://hostname/trac/ will cause
> http://hostname/cgi-bin/trac.cgi to be loaded?

Using Apache, the mod_rewrite is a very powerful and useful tool. It can
rewrite a HTTP request before it is handled:

http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html

However, a simpler approach using ScriptAliasMatch will probably also do the
trick. Something like:

8< ------------------------------------------------------------------------

ScriptAliasMatch /(proj_a|proj_b)(.*) /trac/cgi-bin/trac.cgi$2

<Location "/proj_a">
SetEnv TRAC_ENV "/var/trac/env/proj_a"
</Location>

<Location "/proj_b">
SetEnv TRAC_ENV "/var/trac/env/proj_b"
</Location>

Alias /trac/ /var/trac/htdocs/

<LocationMatch "/(proj_a|proj_b)/login">
AuthType Digest
AuthName "the_auth_name"
AuthDigestFile /var/trac/user_digest
AuthGroupFile /var/trac/user_groups
Satisfy all
Require group trac
</LocationMatch>

------------------------------------------------------------------------ >8

The snippet above is off the top of my head, so typos etc might be present.
It should work though, or at least give you the general idea. :)

--
Daniel Lundin | Edgewall Software
daniel@edgewall.com | Professional Linux & Open Source Consulting
| http://www.edgewall.com/
_______________________________________________
Trac mailing list
Trac@lists.edgewall.com
http://lists.edgewall.com/mailman/listinfo/trac