Page tree
Skip to end of metadata
Go to start of metadata

Overview

This document lists important changes between Apache version 2.2 and Apache version 2.4, and how EasyApache makes them as backwards-compatible as possible.

We made the necessary changes in the default templates and configuration files. However, if you use custom templates or configuration files, you must update those templates and files.

For more information, read the Apache 2.4 Upgrade documentation.

Note:

Apache 2.4 is only available for cPanel & WHM version 11.36 and later.

PreFork Default MPM (Multi-Processing Module)

If the EasyApache profile that you use refers to an MPM that no longer exists, EasyApache uses the PreFork MPM by default. EasyApache also uses the PreFork MPM by default if you do not select an MPM in the profile.

Apache 2.4 Uses Static Modules

Apache version 2.4 uses a dynamic modular structure by default. This can cause problems if a LoadModule directive calls a module that the system did not build in the Apache binary.

EasyApache overrides Apache 2.4's default settings and builds modules statically to provide backward compatibility.

If you use raw opts (custom configure flags) to add statically-compiled functionality into the Apache binary, then you must change the --with-module flag to the --with-module=static flag. If you do not include =static, the system does not compile the module.

Modules

Incompatible modules

Several modules are incompatible with the EasyApache build of Apache version 2.4. If you select Apache version 2.4 in EasyApache, the following modules will not appear in the Options list:

  • mod_perl — This module does not yet support Apache version 2.4
  • mod_mono — This module does not yet support Apache version 2.4
  • mod_gzip — Apache deprecated this module in Apache version 1.X. We strongly recommend that you use the mod_deflate module instead.
  • mod_qos — This module's support for Apache version 2.4 remains experimental.

To include these modules in Apache, load them as Option Modules (opt-mod).

mod_disk_cache renamed to mod_cache_disk

Apache renamed the mod_disk_cache module to the mod_cache_disk module. You must change any references to the original module to use the new name of the module.

Directives

Mutex

Apache replaced the AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath directives with a single Mutex directive in Apache version 2.4.

We converted these directives in the default templates. However, you must to change any custom templates or configuration files that use these directives to use the new Mutex directive syntax.

For example, you must change the following directive in Apache version 2.4.

AcceptMutex default

The new directive will resemble the following example:

Mutex default mpm-accept

For more information on the Mutex changes, read the Apache 2.4 Mutex documentation.

Mutex mpm-accept requires tags with MPM

Because the Mutex mpm-accept directive is not compatible with Event MPM, you must place it within <ifmodule> tags, for example:

<IfModule prefork.c>
    Mutex default mpm-accept
</IfModule>
<IfModule worker.c>
    Mutex default mpm-accept
</IfModule>

NameVirtualHost Directive

Apache deprecated the NameVirtualHost directive in Apache version 2.4.

MaxClients renamed MaxRequestWorkers

Apache renamed the MaxClients directive the MaxRequestWorkers directive in Apache version 2.4. We converted the directive in the default templates and configuration files. If you created any custom templates or configuration files that use the MaxClients directive, you must edit those custom templates or configuration files to use the MaxRequestWorkers directive.

MaxRequestsPerChild renamed MaxConnectionsPerChild

Apache renamed the MaxRequestsPerChild directive the MaxConnectionsPerChild directive in Apache version 2.4. We converted the directive in the default templates and configuration files. However, if you created any custom templates or configuration files that use the MaxRequestsPerChild directive, you must edit those templates or configuration files to use the MaxConnectionsPerChild directive.

AllowOverride default setting

Apache set the AllowOverride directive's default value to None in Apache version 2.4. The AllowOverride directive's default value is All in Apache version 2.2 and earlier.

Templates

Changes to custom template locations

Previously, the system stored custom templates in the following directories:

VersionDirectory Location
Apache 1.3/var/cpanel/templates/apache1/
Apache 2.X/var/cpanel/templates/apache2/

For backwards compatibility, we created the following symlinks:

SymlinkPoints to
/var/cpanel/templates/apache1_3/var/cpanel/templates/apache1/
/var/cpanel/templates/apache2_0/var/cpanel/templates/apache2/
/var/cpanel/templates/apache2_2/var/cpanel/templates/apache2/

The system now stores custom templates in the following directories:

VersionDirectory LocationActual Directory Location
Apache 1.3/var/cpanel/templates/apache1_3//var/cpanel/templates/apache1/
Apache 2.0/var/cpanel/templates/apache2_0//var/cpanel/templates/apache2/
Apache 2.2/var/cpanel/templates/apache2_2//var/cpanel/templates/apache2/
Apache 2.4/var/cpanel/templates/apache2_4//var/cpanel/templates/apache2_4/

Because Apache version 2.0 and Apache version 2.2 share the same directory, any changes that you make to one version's templates affect the other version.

Other Functionality

Server-Side Include (SSI) Expression Parser

Apache version 2.4 uses a new version of the SSI expression parser. However, to ensure backward compatibility, EasyApache set Apache to use the legacy SSI expression parser.

To use the new SSI expression parser, update the appropriate virtual host's include file for userdata or edit the .htaccess file to include the following configuration:

<IfModule mod_version.c>
    <IfVersion >= 2.4>
        <IfModule mod_include.c>
            SSILegacyExprParser Off
        </IfModule>
    </IfVersion>
</IfModule>

Note:

This example requires that you build the mod_version module into Apache.

If you use an Apache version 2.4 SSI expression with the Apache v 2.2 SSI parser, the parser fails and does not return an error message.