You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/02/07 12:53:49 UTC

[Bug 56116] New: Apache and restricted scope in httpd.conf

https://issues.apache.org/bugzilla/show_bug.cgi?id=56116

            Bug ID: 56116
           Summary: Apache <Files> and <FilesMatch> restricted scope in
                    httpd.conf
           Product: Apache httpd-2
           Version: 2.2-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: woodzu123+apachebugzilla@gmail.com

Since this syntax is not allowed:

<Files /path/to/the/file.php>
  Options +ExecCGI
</Files>

There is no way to restrict the scope of <Files> and <FileMatch> directives in
httpd.conf so that it DOES NOT propagate to sub-directories.

I have tried:

<Directory /path/to/the>
  Options -ExecCGI
  <Files file.php>
    Options +ExecCGI
  </Files>
</Directory>

alone and with additional rule:

<Directory /path/to/the/*>
  Options -ExecCGI
</Directory>

This, however, propagates to all directories within the path.

An example of such usage would be to disallow the ExecCGI option by default and
allow it selectively to chosen files without the need to use of .htaccess files
in each directory.

This is not about setting restrictions up in .htaccess files, but in
<VirtualHost> container

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56116] Apache and restricted scope in httpd.conf

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56116

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Eric Covener <co...@gmail.com> ---
In 2.2, you have to name the subdirectories you want a different setting on. 
In 2.4, DirectoryMatch gives you some more flexibility.

See PR49809.

2.2 is working as designed and no concrete safe enhancement is suggested here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56116] Apache and restricted scope in httpd.conf

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56116

Woo <wo...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |woodzu123+apachebugzilla@gm
                   |                            |ail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56116] Apache and restricted scope in httpd.conf

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56116

--- Comment #2 from Woo <wo...@gmail.com> ---
Ok, thanks for your reply on this.

I'm testing this on 2.4.7 but I cannot get this to work on my Windows dev
server.
I have tried restricting the scope with:

<DirectoryMatch F:/folder$>
<DirectoryMatch F:/folder/$>
<DirectoryMatch F:/folder/?$>
<DirectoryMatch "F:/folder$">
<DirectoryMatch "F:/folder/$">
<DirectoryMatch "F:/folder/?$">
<DirectoryMatch "^F:/folder$">
<DirectoryMatch "^F:/folder?$">
<DirectoryMatch "^F:/folder/?$">

Is this a bug or am I missing something here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org