FilesMatch / Location

Hello List,

i wonder why this doesn't apply ...

############################################################ ###########################

In my main httpd.conf i have

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>


This directive is not in any container, just straight forward in
httpd.conf

.....
User apache
Group apache

ServerAdmin root [at] localhost

UseCanonicalName Off

DocumentRoot "/storage/fast/www"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

<Directory "/storage/fast/www">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

DirectoryIndex index.html index.html.var
AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
....

############################################################ ###############

in an virtualhost container i use this


Alias /rsrcdav "/storage/fast/www/virtualhosts/example.com/htdocs/
rsrc/"

<Location /rsrcdav>

php_admin_flag engine off

DAV On
DavMinTimeout 120

ForceType text/plain

Options +Indexes -FollowSymLinks

AuthName "rsrcdav"
AuthType Basic
Order deny,allow
Allow from all
AuthUserFile /pathtofile/.htpasswd
require valid-user
satisfy all
</Location>


############################################################ ###############


My question - if i access

http://example.com/rsrc/.htaccess

i get correctly

"client denied by server configuration"

if i access

http://example.com/rsrcdav/.htaccess

i get the content of the file.


Why is my <location> not using the global directive

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

??


Thanks

Cheers

PM












------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Paulo Martinez [ So, 24 Januar 2010 18:15 ] [ ID #2029714 ]

Re: FilesMatch / Location

On Sun, Jan 24, 2010 at 12:15 PM, Paulo Martinez
<martinezino [at] googlemail.com> wrote:
> =A0<Files ~ "^\.ht">
> =A0 =A0Order allow,deny
> =A0 =A0Deny from all
> =A0</Files>
> =A0 =A0<Location /rsrcdav>
> =A0 =A0 =A0 =A0 Order deny,allow
> =A0 =A0 =A0 =A0 Allow from all
> http://example.com/rsrcdav/.htaccess
>
> i get the content of the file.


Location* is applied after Files*:
http://httpd.apache.org/docs/2.2/sections.html#mergin

--
Eric Covener
covener [at] gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Eric Covener [ So, 24 Januar 2010 20:39 ] [ ID #2029715 ]

Re: FilesMatch / Location

Am 24.01.2010 um 20:39 schrieb Eric Covener:

> On Sun, Jan 24, 2010 at 12:15 PM, Paulo Martinez
> <martinezino [at] googlemail.com> wrote:
>> <Files ~ "^\.ht">
>> Order allow,deny
>> Deny from all
>> </Files>
>> <Location /rsrcdav>
>> Order deny,allow
>> Allow from all
>> http://example.com/rsrcdav/.htaccess
>>
>> i get the content of the file.
>
> Location* is applied after Files*:
> http://httpd.apache.org/docs/2.2/sections.html#mergin

Okay i understand, thanks.

I changed the location- to a directory-container.

But what if i need a location-container?
In the example of my initial post, i can
avoid order,allow,deny-directives because
authorization is controlled by authentication.
But what if i need some authorization control
via order,allow,deny-directives? (the use of
files-directives inside location-containers
is not allowed)

Pragmatically or semantically i want to say:

ht-file access is forbidden. Anything else
despite specific configurations is okay.
How to accomplish this scenario?

Cheers
PM


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Paulo Martinez [ So, 24 Januar 2010 23:02 ] [ ID #2029716 ]
Webserver » gmane.comp.apache.user » FilesMatch / Location

Vorheriges Thema: Whole HTML pages in error log (1.3.x)
Nächstes Thema: How to set ENV variable to an apache log directive?