httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: [PATCH] Allow DocumentRoot within Location blocks
Date Mon, 07 Jan 2002 08:09:00 GMT
> From: Sander van Zoest [mailto:sander@vanZoest.com]
> Sent: 07 January 2002 08:56

> On Mon, 7 Jan 2002, William A. Rowe, Jr. wrote:
> 
>> From: "Ryan Bloom" <rbb@covalent.net>
>>> I would like to discuss the reasoning behind this change.  Why are we trying
>>> to overload the meaning of DocumentRoot this way?
>> Because it allows the DocumentRoot to be, well, nonexistant.

I didn't test it with no top level DocumentRoot present.  At first glance
I'd say we fail with no DocumentRoot at top level.  We could certainly
resolve that easily though.
 
> This is very useful in environments where you want an URI space that
> doesn't necessarily line up with anything on a file system.
> 
> This would be very useful for things such as mod_perl, XML/XSLT solutions,
> RTSP/Icecast servers, etc.
> 
>> It allows us to have the following section;
>> <Location /nowhere>
>>     DocumentRoot unset
>> </Location>
>> that makes it 100% clear where nowhere goes.  It is also possibly easier
>> than alias, since
> 
> I am not sure if I like the "unset" keyword. In the mime and handler case
> we use Add/Remove and we use "On" and "Off" already. Maybe using
> "Off" is valid here? Then we could probably also use "On" to enable
> the DocumentRoot again, where it would enable it to a previously set
> DocumentRoot higher up in the tree or default to the compiled in default
> if there was nothing defined elsewhere.

The current patch defaults the DocumentRoot to 'unset' (which btw isn't
recognised as an option) within <Location> blocks.  In other words,
a <Location> block without a DocumentRoot directive will fail if it
is supposed to map to the filesystem.  I did this to match the description
in STATUS.  IMO, we don't need 'unset' or any other keyword; DocumentRoot
takes a path.  If you don't want to specify one, don't put the directive
in there.
 
>> works the same as
>> Alias /private /some/private/resource
>> <Location /private>
>>     Options deny,allow
>>     Allow from only.me
>> </Location>
> 
> (I assume here you meant "Order" instead of "Options")
> You could also potentially consider writing this as
> 
> <Directory /some/private/resource>
>    Alias /private # Or maybe Uri /private
>    Options deny,allow
>    Allow from only.me
> </Directory>
> 
> This does not change the notion of having a single DocumentRoot and
> allows for the same flexibility (if we remove the requirement for a
> DocumentRoot and allow for DocumentRoot [Off|unset|path] or whatever).
> 
> Cheers,
> 
> --
> Sander van Zoest                                          sander@vanzoest.com

Sander Striker

Mime
View raw message