On Nov 1, 3:23 pm, rjcarr <[EMAIL PROTECTED]> wrote: > I'm sure this has been asked many times before, and is in a doc > somewhere, but all I found was this (and it didn't quite answer my > questions): > > http://trac.edgewall.org/wiki/TracMultipleProjectsSVNAccess > > I have an active multi-project environment for trac+svn served by > apache.
When you say hosted by Apache, do you mean under mod_python, or do you mean you are using Apache as the front end and proxying to tracd running behind it? It doesn't really matter except to the extent of knowing whether you are using mod_python. > It all works fine and in my apache config files I have block > pairs like this: > > <Location "/trac/project1"> > AuthType Basic > AuthName "Trac Auth" > AuthUserFile /path/to/project1/auth.htpasswd > Require valid-user > </Location> > > <Location "/svn/project1"> > AuthType Basic > AuthName "SVN Auth" > AuthUserFile /path/to/project1/auth.htpasswd > Require valid-user > </Location> If it is the same user/passwd database for Trac and svn for the same project, why are you setting AuthName differently for Trac vs svn as that would mean that you would need to enter your login information for each. If AuthName was the same for each, would need to only enter it once. But then this is probably academic if your never actually use the inbuilt ability of Subversion to browse the code from a web browser. :-) > As you see, each project (trac+svn) has (and needs) its own auth > file. As I said, this works, but the problem is each time a new > project is added, an apache restart is needed (as far as I know). > This isn't convenient so I'm looking for a better solution. If you want a different AuthName value for each project then you only have two options. The first is what you are doing now. The second is to use mod_python to implement your own authentication handler. This authentication handler would need to look at the request URI and from that work out which project you are targeting. If no credentials have been supplied, the project name derived from the URI would be used somehow in the auth realm name passed back in the response indicating authentication is required. If the credentials are present, the project name derived from the URI would be used to work out what database of user/password information should be use to perform the actual authentication. In short, bit of stuffing around, but could be done if using mod_python. May require mod_python 3.3.1 specifically though, older versions may not make it possible or make it harder at least. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
