X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=docs%2Fmanual%2Fupgrading.html.en;h=ad6b4540aaf8bcc6657ee58f53098adeba3e9ba7;hb=f0348fc28341bfdcce16cbf8c7d736de12ff85da;hp=56b7383c62f811be1fd35a168e14fbf16f817ddb;hpb=04d5492b0b315168e86adafb3e25aee485e06928;p=apache diff --git a/docs/manual/upgrading.html.en b/docs/manual/upgrading.html.en index 56b7383c62..ad6b4540aa 100644 --- a/docs/manual/upgrading.html.en +++ b/docs/manual/upgrading.html.en @@ -1,19 +1,24 @@ - -Upgrading to 2.4 from 2.2 - Apache HTTP Server +Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.5 - + + + +
<-
Apache > HTTP Server > Documentation > Version 2.5

Upgrading to 2.4 from 2.2

@@ -46,7 +51,7 @@
  • Third Party Modules
  • Common problems when upgrading
  • See also

    + Apache HTTP Server 2.4
  • Comments
  • top

    Compile-Time Configuration Changes

    @@ -78,7 +83,7 @@
  • configure: By default, only a basic set of modules is loaded. The other LoadModule directives are commented - out.
  • + out in the configuration file.
  • configure: the "most" module set gets built by default
  • @@ -106,6 +111,19 @@ which explains the new mechanisms for controlling the order in which the authorization directives are applied.

    +

    Directives that control how authorization modules respond when they don't match + the authenticated user have been removed: This includes + AuthzLDAPAuthoritative, AuthzDBDAuthoritative, AuthzDBMAuthoritative, + AuthzGroupFileAuthoritative, AuthzUserAuthoritative, + and AuthzOwnerAuthoritative. These directives have been replaced by the + more expressive RequireAny, + RequireNone, and + RequireAll.

    + +

    If you use mod_authz_dbm, you must port your + configuration to use Require dbm-group ... in place + of Require group ....

    +

    Access control

    @@ -120,46 +138,148 @@ although for compatibility with old configurations, the new module mod_access_compat is provided.

    +

    Mixing old and new directives

    +

    Mixing old directives like Order, Allow or Deny with new ones like + Require is technically possible + but discouraged. mod_access_compat was created to support + configurations containing only old directives to facilitate the 2.4 upgrade. + Please check the examples below to get a better idea about issues that might arise. +

    +
    +

    Here are some examples of old and new ways to do the same access control.

    -

    In this example, all requests are denied.

    -

    2.2 configuration:

    - - Order deny,allow
    - Deny from all -

    -

    2.4 configuration:

    - - Require all denied -

    - -

    In this example, all requests are allowed.

    -

    2.2 configuration:

    - - Order allow,deny
    - Allow from all -

    -

    2.4 configuration:

    - - Require all granted -

    - -

    In the following example, all hosts in the example.org domain +

    In this example, there is no authentication and all requests are denied.

    +

    2.2 configuration:

    Order deny,allow
    +Deny from all
    +
    +

    2.4 configuration:

    Require all denied
    +
    + +

    In this example, there is no authentication and all requests are allowed.

    +

    2.2 configuration:

    Order allow,deny
    +Allow from all
    +
    +

    2.4 configuration:

    Require all granted
    +
    + +

    In the following example, there is no authentication and all hosts in the example.org domain are allowed access; all other hosts are denied access.

    -

    2.2 configuration:

    - - Order Deny,Allow
    - Deny from all
    - Allow from example.org -

    -

    2.4 configuration:

    - - Require host example.org -

    +

    2.2 configuration:

    Order Deny,Allow
    +Deny from all
    +Allow from example.org
    +
    +

    2.4 configuration:

    Require host example.org
    +
    + +

    In the following example, mixing old and new directives leads to + unexpected results.

    + +

    Mixing old and new directives: NOT WORKING AS EXPECTED

    DocumentRoot "/var/www/html"
    +
    +<Directory "/">
    +    AllowOverride None
    +    Order deny,allow
    +    Deny from all
    +</Directory>
    +
    +<Location "/server-status">
    +    SetHandler server-status
    +    Require 127.0.0.1
    +</Location>
    +
    +access.log - GET /server-status 403 127.0.0.1
    +error.log - AH01797: client denied by server configuration: /var/www/html/server-status
    +
    +

    Why httpd denies access to servers-status even if the configuration seems to allow it? + Because mod_access_compat directives take precedence + over the mod_authz_host one in this configuration + merge scenario.

    + +

    This example conversely works as expected:

    + +

    Mixing old and new directives: WORKING AS EXPECTED

    DocumentRoot "/var/www/html"
    +
    +<Directory "/">
    +    AllowOverride None
    +    Require all denied
    +</Directory>
    +
    +<Location "/server-status">
    +    SetHandler server-status
    +    Order deny,allow
    +    Deny from all
    +    Allow From 127.0.0.1
    +</Location>
    +
    +access.log - GET /server-status 200 127.0.0.1
    +
    +

    So even if mixing configuration is still + possible, please try to avoid it when upgrading: either keep old directives and then migrate + to the new ones on a later stage or just migrate everything in bulk. +

    +

    In many configurations with authentication, where the value of the + Satisfy was the default of ALL, snippets + that simply disabled host-based access control are omitted:

    + +

    2.2 configuration:

    Order Deny,Allow
    +Deny from all
    +AuthBasicProvider File
    +AuthUserFile /example.com/conf/users.passwd
    +AuthName secure
    +Require valid-user
    +
    +

    2.4 configuration:

    # No replacement needed
    +AuthBasicProvider File
    +AuthUserFile /example.com/conf/users.passwd
    +AuthName secure
    +Require valid-user
    +
    + +

    In configurations where both authentication and access control were meaningfully combined, the + access control directives should be migrated. This example allows requests meeting both criteria:

    +

    2.2 configuration:

    Order allow,deny
    +Deny from all
    +# Satisfy ALL is the default
    +Satisfy ALL
    +Allow from 127.0.0.1
    +AuthBasicProvider File
    +AuthUserFile /example.com/conf/users.passwd
    +AuthName secure
    +Require valid-user
    +
    +

    2.4 configuration:

    AuthBasicProvider File
    +AuthUserFile /example.com/conf/users.passwd
    +AuthName secure
    +<RequireAll>
    +  Require valid-user
    +  Require ip 127.0.0.1
    +</RequireAll>
    +
    + +

    In configurations where both authentication and access control were meaningfully combined, the + access control directives should be migrated. This example allows requests meeting either criteria:

    +

    2.2 configuration:

    Order allow,deny
    +Deny from all
    +Satisfy any
    +Allow from 127.0.0.1
    +AuthBasicProvider File
    +AuthUserFile /example.com/conf/users.passwd
    +AuthName secure
    +Require valid-user
    +
    +

    2.4 configuration:

    AuthBasicProvider File
    +AuthUserFile /example.com/conf/users.passwd
    +AuthName secure
    +# Implicitly <RequireAny>
    +Require valid-user
    +Require ip 127.0.0.1
    +
    +

    Other configuration changes

    @@ -188,16 +308,15 @@ settings to replace it in 2.4. +
  • AllowOverride now + defaults to None.
  • +
  • EnableSendfile now defaults to Off.
  • FileETag now defaults to "MTime Size" (without INode).
  • -
  • mod_log_config: ${cookie}C - matches whole cookie names. Previously any substring would - match.
  • -
  • mod_dav_fs: The format of the DavLockDB file has changed for systems with inodes. The old DavLockDB file must be deleted on upgrade. @@ -224,6 +343,12 @@ jsessionid.
  • +
  • mod_cache: The second parameter to + CacheEnable only + matches forward proxy content if it begins with the correct + protocol. In 2.2 and earlier, a parameter of '/' matched all + content.
  • +
  • mod_ldap: LDAPTrustedClientCert is now consistently a per-directory setting only. If you use this directive, review your configuration to make sure it is @@ -248,10 +373,17 @@ option has been removed in favour of per-module LogLevel configuration.
  • -
  • mod_ext-filter: The DebugLevel +
  • mod_ext_filter: The DebugLevel option has been removed in favour of per-module LogLevel configuration.
  • +
  • mod_proxy_scgi: The default setting for + PATH_INFO has changed from httpd 2.2, and + some web applications will no longer operate properly with + the new PATH_INFO setting. The previous setting + can be restored by configuring the proxy-scgi-pathinfo + variable.
  • +
  • mod_ssl: CRL based revocation checking now needs to be explicitly configured through SSLCARevocationCheck.
  • @@ -263,6 +395,17 @@
  • mod_reqtimeout: If the module is loaded, it will now set some default timeouts.
  • +
  • mod_dumpio: DumpIOLogLevel + is no longer supported. Data is always logged at LogLevel trace7.
  • + +
  • On Unix platforms, piped logging commands configured using + either ErrorLog or + CustomLog were invoked using + /bin/sh -c in 2.2 and earlier. In 2.4 and later, + piped logging commands are executed directly. To restore the + old behaviour, see the piped logging + documentation.
  • +
    top
    @@ -278,7 +421,11 @@
  • mod_ssl: The default format of the *_DN variables has changed. The old format can still be used with the new LegacyDNStringFormat argument to SSLOptions. The SSLv2 protocol is - no longer supported.
  • + no longer supported. SSLProxyCheckPeerCN + and SSLProxyCheckPeerExpire + now default to On, causing proxy requests to HTTPS hosts + with bad or outdated certificates to fail with a 502 status code (Bad + gateway)
  • htpasswd now uses MD5 hash by default on all platforms.
  • @@ -301,6 +448,16 @@ enabled for the directory containing the error documents. +
  • The functionality provided by mod_authn_alias + in previous versions (i.e., the AuthnProviderAlias directive) + has been moved into mod_authn_core. +
  • + +
  • mod_cgid uses the servers Timeout to limit the length of time to wait for CGI output. + This timeout can be overridden with + CGIDScriptTImeout. +
  • +
    top
    @@ -325,11 +482,18 @@ - load module mod_access_compat, or update configuration to 2.4 authorization directives.
  • Ignoring deprecated use of DefaultType in line NN of /path/to/httpd.conf - remove DefaultType and replace with other configuration settings.
  • +
  • Invalid command 'AddOutputFilterByType', perhaps misspelled + or defined by a module not included in the server configuration + - AddOutputFilterByType + has moved from the core to mod_filter, which must be loaded.
  • Errors serving requests:
  • @@ -337,7 +501,28 @@

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file