Alvaro Lopez Ortega wrote:
<snip>
We have been discussing about add a new way to define properties on
specific resources. A new "Request" clause would fit well to solve
the task, at the same time it keeps the server scheme consistent.
The precedence between them should be:
1.- Requests
2.- Extensions
3.- Directories
Kurt brought up an issue with this precedencein his email to which I
briefly offered a possible solution. Looking at it again, it seem that
the issue of files that match an extension but which the user wants to
be treated specially, could be solved using Request. The admin could
set the path to which the the files match to use the file handler (or
common or whatever) and therefore override the Extention entry. I'm not
sure if this is actually a good or elegent solution, it just seems to be
one that would be imediately available if this new scheme is adopted.
# Example 1:
#
Request "/cgi-bin/trac.cgi/login" {
Auth Digest { .. }
}
<snip>
Directory /cgi-bin {
Handler cgi {
Env TRAC_ENV "/var/projects"
}
DocumentRoot /usr/share/trac/cgi-bin
}
I like this. It seems like it can easily be extended to match my real
goal. Now, for a little background on my twisted ways:
Currently I am using apache + mod_python to host my trac sites. I use
it internally at work for project management. Because of trac's nature,
I need to have one trac project for every project I'm working on
(probably the weakest link for trac right now). mod_python makes it
fairly easy. I host all of my trac projects from /var/projects/trac and
then setup apache to handle the different paths. The config looks like this:
<Location /projects>
SetHandler mod_python
PythonHandler trac.ModPythonHandler
PythonOption TracUriRoot /projects
PythonOption TracEnvParentDir "/var/projects/trac"
</Location>
<LocationMatch "^/projects/[[:graph:]]+/login">
AuthType Basic
AuthName "Project Trac sites"
AuthUserFile /var/projects/conf/projectusers
Require valid-user
</LocationMatch>
Now, with the proposal, I think I can rewrite this config as:
Request "/projects/.+/login" {
Auth {...}
}
Request "/projects/.+/" {
Handler cgi {
Scriptalias /usr/share/trac/cgi-bin/trac.cgi
Env TRAC_ENV_PARENT_DIR "/var/projects/trac"
}
Now, I could be completely off base and this won't work even under the
new proposal. However, that is kind of what I'm after. I'm looking at
replacing my existing apache installation and rely heavily on trac.
It's possible to host multiple trac sites by simply adjusting the
configuration for each one, but I'm sure you can see that isn't a
desirable option for more than 2 or so sites.
-John
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee