Bug 871373

Summary: Broken configuration for httpd 2.4
Product: [Fedora] Fedora Reporter: Remi Collet <rcollet>
Component: distributionAssignee: Radek Vokál <rvokal>
Status: CLOSED EOL QA Contact: Radek Vokál <rvokal>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 18CC: bruno, dennis, fedora, rvokal
Target Milestone: ---Keywords: FutureFeature, Reopened, Tracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-26 09:35:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 871386, 871123, 871353, 871361, 871363, 871366, 871376, 871377, 871378, 871383, 871385, 871387, 871388, 871392, 871394, 871396, 871398, 871400, 871402, 871404, 871414, 871415, 871417, 871418, 871426, 871428, 871430, 871431, 871432, 871434, 871438, 871442, 871443, 871450, 871454, 871456, 871457, 871461, 871463, 871465, 871467, 871468, 871469, 871470, 871471, 871472, 871474, 871477, 871480, 871483, 871486, 871489, 871490, 871492, 871493, 871494, 871495, 871498, 871501, 871502, 876907, 890734    
Bug Blocks:    

Description Remi Collet 2012-10-30 10:48:16 UTC
This bug if a tracker for all web applications to provide an apache configuration file compatible with httpd 2.4.

http 2.4 use the Require directive for all access control
see: http://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require

http 2.2 use the allow/deny/order which are emulated by the mod_acces_compat
see: httpd.apache.org/docs/2.4/mod/mod_access_compat.html

But, using old allow/deny/order directives allow to restrict a sub-folder access, it doesn't allow to open a sub-folder (as / directory is protected by mod_authz_core)

Here is sample file, compatible with both httpd 2.2 and 2.4

<Directory /usr/share/foo/>
  <IfModule mod_authz_core.c>
    # Apache 2.4
    Require local
  </IfModule>
  <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
  /IfModule>
</Directory>

Comment 1 Dmitry Butskoy 2012-10-31 12:28:17 UTC
When cut/paste, plese don't forget to fix a little typo in the last </IfModule> :)

Comment 2 Bruno Wolff III 2012-10-31 13:02:41 UTC
I saw two conf files that picked up the typo. /etc/httpd/conf.d/tiquit.conf and /etc/httpd/conf.d/limph.conf .

Comment 3 Remi Collet 2012-11-01 07:10:32 UTC
Additionnal tips

Open to everyone
    Require all granted

Close for everyone
    Require all denied

By default, in a group of authorization directives, only one have to succeed (<RequireAny>), see <RequireAll> if you need all to succeed, ex:

    <RequireAll> 
        Require local
        Require valid-user
    </RequireAll>

Comment 4 Fedora End Of Life 2013-12-21 09:14:12 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2014-02-05 12:46:15 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Christopher Meng 2014-02-07 09:30:25 UTC
Not finished yet.

Comment 9 Jan Kurik 2015-12-22 11:30:50 UTC
This bug is currently assigned to an unsupported release. If you think this bug is still valid and should remain open, please re-assign it to a supported release (F22, F23) or to rawhide.

Bugs which will be assigned to an unsupported release are going to be closed as EOL (End Of Life) on January 26th, 2016.