Skip to end of metadata
Go to start of metadata

Overview

cPanel & WHM manages the Apache web server and its components with EasyApache. When you install cPanel & WHM version 11.52 or later, the default (fast) installation method uses a precompiled default EasyApache configuration, which includes the basic requirements for a functional web server. cPanel & WHM versions 11.50 and earlier compile EasyApache during the installation process. For more information, read our Installation Guide - Customize Your Installation documentation.

Use WHM's EasyApache 3 interface (Home >> Software >> EasyApache 3) to modify your Apache configuration. To access EasyApache via the command line interface (CLI), use the /scripts/easyapache script.

Note:

The Apache Software Foundation develops the Apache HTTP Server Project, which provides the Apache web server software.

Warning:

Currently, we no longer develop EasyApache 3 and only release security updates. We have tentatively scheduled EasyApache 3 for deprecation at some point in 2018. You will receive at least three months notification prior to official deprecation. After that time, EasyApache 3 will no longer receive any updates. For more information, read our cPanel Long-Term Support documentation.

We strongly recommend that you upgrade to EasyApache 4. For more information, read our EasyApache 4 documentation. 

Featured documentation

  EasyApache 3

IntroductionFAQ

Change Log Release Notes  

ProfilesCustomization

Tomcat

Migrate from Tomcat 5.5 to 7

How to Deploy Java Applications

Important:

EasyApache 3 does not support Tomcat for new installations. EasyApache 4 does not support Tomcat and we do not plan to provide support in the future. 

Apache versions

The Apache development team regularly releases new versions of Apache. We test and make the new version available in EasyApache to ensure that your software remains up-to-date. 

Minor version changes do not impact functionality, but major updates may require changes to your configuration. In most cases, the EasyApache software adjusts your configuration automatically. If you use a custom configuration, you may need to make manual adjustments.

Default Apache version

EasyApache uses Apache 2.4 by default for new installations of cPanel & WHM. To install Apache 2.2 on a new installation, you must use a custom profile. 

For information on changes between Apache version 2.2 and Apache version 2.4, read our Critical Changes In Apache 2.4 documentation.

Note:

Apache 2.2 is not available on servers that run CentOS 7, CloudLinux™ 7, or Red Hat® Enterprise Linux (RHEL) 7. You must use Apache 2.4 instead.  

Components of Apache

The Apache configuration includes the following components by default:

  • The core Apache modules — The modules necessary to perform the basic duties of a server. You cannot uninstall these modules.
  • The most common Apache modules — These modules exist on most servers. 
  • A Multi-Processing Module (MPM) — The default Apache configuration uses the MPM Prefork. The MPM that you select determines how Apache handles requests. For more information, read our MPM Options documentation. 
  • PHP — The default PHP version is PHP 5.5. The default PHP handler is suPHP. For more information, read our PHP Home documentation. 

Modify Apache

You can use several methods to modify your Apache configuration. Read the following documentation for more information:

Apache security

We strongly recommend that you read Apache's Security Tips for Apache version 2.4 or Security Tips for Apache version 2.2 documentation.

EasyApache provides the ModSecurity™ Apache module.

Warning:

  • You must install and configure a ruleset in order to use ModSecurity.
  • cPanel & WHM versions 11.44 and earlier include very basic ModSecurity rules. You must update these rules in WHM's ModSecurity interface ( Home >> Plugins >> ModSecurity ).
  • For more information about the ModSecurity Apache module, read our Apache Module: ModSecurity documentation.

Apache file locations

File or directory locationDescription
/usr/local/apache/logs/error_logThe Apache error log.
/usr/local/apache/conf/httpd.confThe primary Apache configuration file.
/usr/local/apache/conf/The primary Apache configuration file directory.
/usr/local/apache/conf/includes/The directory that contains the include files that add content to the httpd.conf file. You can modify these configuration files via the command line interface (CLI) or in the Include Editor section of WHM's Apache Configuration interface (Home >> Service Configuration >> Apache Configuration).

For more information on the location of the files to use to customize your Apache configuration, read our Advanced Apache Configuration documentation.

Troubleshoot Apache

If you experience issues with Apache, we recommend that you perform the following steps to isolate the cause of the issue:

  • Build EasyApache with the Apache Basic 2.4 or Apache Basic 2.2 profile. If the issue resolves when the EasyApache build completes, then the issue relates to an option that you selected or a custom module.
  • If you modified your Apache configuration file directly, create a backup copy of your configuration and run the /scripts/rebuildhttpdconf script. If the issue resolves after the script completes, then the issue relates to a directive or custom entry inside the httpd.conf file.

  • If you modified any files in the /usr/local/apache/conf/includes/ directory, create a backup copy of the files and remove all entries from the files. Restart the Apache service with the service httpd restart command. If the issue resolves after the Apache service restarts, then the issue relates to an entry in one of the include files.