The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

apache2_4 main.default template syntax

Discussion in 'EasyApache' started by John W, Apr 3, 2013.

  1. John W

    John W Member

    Joined:
    Aug 24, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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 -%]
     
  2. cPanelKevinS

    cPanelKevinS Member
    Staff Member

    Joined:
    Mar 7, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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?
     
  3. John W

    John W Member

    Joined:
    Aug 24, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
Loading...

Share This Page