httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: Torching ap_document_root
Date Mon, 11 Mar 2002 00:00:48 GMT
On Sun, Mar 10, 2002 at 05:26:01PM +0000, Tony Finch wrote:
> On Fri, Mar 08, 2002 at 12:49:16PM -0500, Rodent of Unusual Size wrote:
> > 
> > Greg, please take a step back and ask yourself: what *harm*
> > does it do for modules to know the DocumentRoot?  If it does no
> > harm, then standing in the way of others just because you can't
> > think of an application *does* do harm.
> There is no problem with it in principle, but the current
> implementation is broken. It is too tied to the core's idea
> of the URI->filesystem mapping and modules are unable to fix
> that when they know better (mod_vhost_alias, mod_userdir, ...).

Exactly. DocumentRoot is rather meaningless in the presence of Alias,
Location, and other directives that define the URL space of the server. The
DocumentRoot is an arbitrary point. Even worse, it hard-codes the concept of
the root being tied to the filesystem.

Relying on that isn't very good. If Module FOO wants to know something about
the filesystem or the URL space, it should be told explicitly. Or we should
have a way for files to say "tell me the filesystem path for <this> URL"
(knowing that it could come back with "doesn't exist"). To some extent, that
latter question is currently solved by using a sub-request to map a URI to
the filesystem. Ugly, but that is how the server is currently set up.


Greg Stein,

View raw message