On 12/13/2010 5:08 AM, Graham Leggett wrote:
> 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 wide.

I don't see why it's required, and I don't see why you keep talking of other 
locations.

> 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.

There isn't another level.  It says Root, root == "/".

> 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?

Ideally, the lack of a DocumentRoot/Alias/MountFilePath indicates there is no 
file
content.  The location walk NEVER disappears.  But Directory walk could be 
bypassed
entirely, with a default no_document handler returning a 404.

Since there can be only one path to which a Root applies, placing Root 
directives
at the Server level is entirely sensible.

>>> 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
> </Location>

No, because that is not a root.  Sorry, the english language overrides your
proposed semantics.

Reply via email to