You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sébastien Moretti <se...@unil.ch> on 2011/05/09 15:00:36 UTC

[users@httpd] FilesMatch does nothing

Hi

I run several servers and sometimes for some of them, directives in 
FilesMatch seem never to be executed.

Problems come when apache is the frontend of other servers such as 
tomcat or play framework, through mod_jk or mod_proxy.


Are there known issues about that ?
Some conflicts with mod_rewrite and/or mod_alias ?

Thanks



I run apache 2.2

-- 
Sébastien Moretti


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] FilesMatch does nothing

Posted by Sébastien Moretti <se...@unil.ch>.
>>>> Hi
>>>>
>>>> I run several servers and sometimes for some of them, directives in
>>>> FilesMatch seem never to be executed.
>>>>
>>>> Problems come when apache is the frontend of other servers such as tomcat
>>>> or
>>>> play framework, through mod_jk or mod_proxy.
>>>
>>> In Apache terms, these requests don't match any Directory or Files
>>> containers because they're not mapped to any Directory or file.
>>> Pieces of the URL aren't files.
>>>
>>> Use Location/LocationMatch.
>>
>> I should use LocationMatch everywhere, it will be less ambiguous for my
>> mind.
>>
>> Thanks Eric
>>
>
> FWIW -- The manual cautions against this, since you might accidentally
> expose a resource on a 2nd URL (or via some 'equivalent URL?') and
> have access control mis-applied.
>

I mainly take care of access control issues at the OS level and use
FileMatch or LocationMatch for HTTP header issues.

But I have definitely to take care of that.

Thanks again

-- 
Sébastien Moretti

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] FilesMatch does nothing

Posted by Mark Montague <ma...@catseye.org>.
  On May 9, 2011 9:21 , Eric Covener <co...@gmail.com> wrote:
> On Mon, May 9, 2011 at 9:13 AM, Sébastien Moretti
> <se...@unil.ch>  wrote:
>>>> I run several servers and sometimes for some of them, directives in
>>>> FilesMatch seem never to be executed.
>>>>
>>>> Problems come when apache is the frontend of other servers such as tomcat
>>>> or
>>>> play framework, through mod_jk or mod_proxy.
>>> In Apache terms, these requests don't match any Directory or Files
>>> containers because they're not mapped to any Directory or file.
>>> Pieces of the URL aren't files.
>>>
>>> Use Location/LocationMatch.
>> I should use LocationMatch everywhere, it will be less ambiguous for my
>> mind.
> FWIW -- The manual cautions against this, since you might accidentally
> expose a resource on a 2nd URL (or via some 'equivalent URL?') and
> have access control mis-applied.

Or to put this another way...   Location and LocationMatch don't really 
control access to resources, they control access via specific resource 
names; they leave resources accessible via other names / means.  
Directory and DirectoryMatch, on the other hand, protect the actual 
filesystem resources.

--
   Mark Montague
   mark@catseye.org


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] FilesMatch does nothing

Posted by Eric Covener <co...@gmail.com>.
On Mon, May 9, 2011 at 9:13 AM, Sébastien Moretti
<se...@unil.ch> wrote:
>>> Hi
>>>
>>> I run several servers and sometimes for some of them, directives in
>>> FilesMatch seem never to be executed.
>>>
>>> Problems come when apache is the frontend of other servers such as tomcat
>>> or
>>> play framework, through mod_jk or mod_proxy.
>>
>> In Apache terms, these requests don't match any Directory or Files
>> containers because they're not mapped to any Directory or file.
>> Pieces of the URL aren't files.
>>
>> Use Location/LocationMatch.
>
> I should use LocationMatch everywhere, it will be less ambiguous for my
> mind.
>
> Thanks Eric
>

FWIW -- The manual cautions against this, since you might accidentally
expose a resource on a 2nd URL (or via some 'equivalent URL?') and
have access control mis-applied.


-- 
Eric Covener
covener@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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] FilesMatch does nothing

Posted by Sébastien Moretti <se...@unil.ch>.
>> Hi
>>
>> I run several servers and sometimes for some of them, directives in
>> FilesMatch seem never to be executed.
>>
>> Problems come when apache is the frontend of other servers such as tomcat or
>> play framework, through mod_jk or mod_proxy.
>
> In Apache terms, these requests don't match any Directory or Files
> containers because they're not mapped to any Directory or file.
> Pieces of the URL aren't files.
>
> Use Location/LocationMatch.

I should use LocationMatch everywhere, it will be less ambiguous for my 
mind.

Thanks Eric

-- 
Sébastien Moretti


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] FilesMatch does nothing

Posted by Eric Covener <co...@gmail.com>.
On Mon, May 9, 2011 at 9:00 AM, Sébastien Moretti
<se...@unil.ch> wrote:
> Hi
>
> I run several servers and sometimes for some of them, directives in
> FilesMatch seem never to be executed.
>
> Problems come when apache is the frontend of other servers such as tomcat or
> play framework, through mod_jk or mod_proxy.

In Apache terms, these requests don't match any Directory or Files
containers because they're not mapped to any Directory or file.
Pieces of the URL aren't files.

Use Location/LocationMatch.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org