httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: SetVirtualDocumentRoot / per request document root / context root?
Date Mon, 13 Dec 2010 11:08:11 GMT
On 13 Dec 2010, at 5:11 AM, William A. Rowe Jr. wrote:

>> An idea from left field.
>> Is there a reason that DocumentRoot is a virtual host wide setting?
> Yes, root describes "/", there is only one <Location "/">.

I can understand why such a setting would be required, but I still  
don't see why that requirement binds us to it being set virtual host  

You could either treat the lack of a DocumentRoot defined at the /  
level as a fatal error that prevents the server from starting, or you  
could fall back on a precompiled default directory.

In theory, the only reason I can see for requiring it virtual host  
wide is if the value is required before the location walk. Is it?

>> Does it not make sense to make it per-Location instead?
> No, but MountFilePath /path/to/foo in a Location basis makes sense.

What I had in mind was:

DocumentRoot /somewhere
<Location /bar>
   DocumentRoot /somewhereelse

which would be equivalent to MountFilePath.

> You might think I just said the same thing, but I had brought this up
> before back around the beginnings of 2.0.  DocumentRoot is an awfully
> ancient and limiting construct.  Some suggest Alias is the same thing
> (which it is, in one sense), but it seems like we could fold both into
> a single concept.
> The reason you are still stuck with legacy docroot constructs is  
> CGI, etc.

I don't mind being stuck with legacy docroot constructs, however I do  
see a different way of implementing them though, and I entirely agree  
on the assessment that it is ancient and limiting, which is why I am  
exploring the options by asking "what if".


View raw message