apache2_4 main.default template syntax

John W

Member
Aug 24, 2007
16
0
51
Orlando
Shouldn't the locations for status use the Require instead of Allow?
Instead of this
Code:
<Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

[% IF serve_server_status %]
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from [% allow_server_info_status_from %]
</Location>
[% END -%]
[% IF serve_server_info %]
<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from [% allow_server_info_status_from %]
</Location>
[% END -%]
shouldn't it be
Code:
<Location /whm-server-status>
    SetHandler server-status
    Require 127.0.0.1
</Location>

[% IF serve_server_status %]
<Location /server-status>
    SetHandler server-status
    Require [% allow_server_info_status_from %]
</Location>
[% END -%]
[% IF serve_server_info %]
<Location /server-info>
    SetHandler server-info
    Require [% allow_server_info_status_from %]
</Location>
[% END -%]
 

cPanelKevinS

Member
Staff member
Mar 7, 2013
8
0
1
To make the transition from Apache 2.2 to 2.4 easier, we enable the mod_access_compat module in Apache 2.4. This lets us use the same access permission directives in both versions, and makes it easier to translate the configuration file when moving back and forth between the two versions.

The new 2.4 access control directives (Require, RequireAll, RequireAny, etc) are still available, and you can use them in customizing your own configuration (with the understanding that they will break if you choose to move back to Apache 2.2 or earlier).

Is the use of 2.2-style directives in the standard template causing you any difficulty?
 

John W

Member
Aug 24, 2007
16
0
51
Orlando
No, it's not really a problem for me but after reading all the EA documentation and Upgrading to 2.4 from 2.2 - Apache HTTP Server I thought the 2.4 default template would follow 2.4 directives. I thought it might be an oversight, or that I was missunderstanding the upgrade documentaion. I just thought that the 2.4 templates would be 2.4 and the 2.2 would be 2.2, but maybe I spent too much time reading the 2.4 documentation.