On Sat, 30 Jan 2010, Graham Leggett wrote:
On 30 Jan 2010, at 12:04 PM, Stefan Fritsch wrote:
I don't follow how this makes it easier to use the recommended setup?
In your example config, you defined /dav as being handled by mod_dav, and
then you defined a FilesMatch (as I recall) that defined mod_php to be used
by all URLs in the complete URL space that ended with ".php". In so doing
you're creating two configs that both overlap and contradict themselves, and
this is specifically discouraged by the recommended setup.
It's not that easy to enable mod_php globally except for one subdir, at
least for the casual admin. For the FilesMatch, one would need some
advanced regexp foo. The same is true if you have AddType'd various script
extensions.
The example config at
http://httpd.apache.org/docs/2.2/mod/mod_dav.html#complex recommends using
'ForceType text/plain' to override the 'AddType application/x-httpd-php
.php' that most users have somewhere else in their config. This is a
pretty bad hack, IMHO. Most files in the dav directory will be delivered
with the wrong content type.
I also don't like the idea that mod_dav is treated differently to other
handlers. If you want to really solve this problem, you need to do so
generically.
mod_dav is not treated differently, is should just handle the request. The
fact that it delegates this to the default handler for some providers
should not concern the average user. Or how do you explain to a user that
a config that works fine with 'Dav svn' does not work with 'Dav on'? (Or
the other way round, depending on what you are trying to achieve.)