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

Overview

EasyApache 4 installs and manages the Apache web server and all of its components. When you install cPanel & WHM, the installation process automatically runs EasyApache 4 which installs Apache with the basic requirements for a functional web server.

To modify your Apache configuration, use WHM's EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4). 

Important:

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

Apache versions

When the Apache development team releases a new version of Apache, we test the software and update EasyApache 4's RPMs.

Minor version number changes do not impact functionality, but major updates may require changes to your configuration. In many cases, EasyApache 4 makes the necessary adjustments automatically. If you have a custom configuration, you may need to make further manual adjustments.

EasyApache 4 only supports Apache 2.4.

Note:

When you migrate from EasyApache 3 to EasyApache 4, any profile that contains an older version of Apache will require an upgraded version of Apache. For more information on the migration process, read our The EasyApache 3 to EasyApache 4 Migration Process documentation.

Components of Apache

Your Apache configuration includes the following components by default:

  • The core Apache modules — Your Apache configuration includes the necessary modules to perform the basic duties of a web server.
  • The most common Apache modules — Your Apache configuration includes the modules that most webservers use.
  • A Multi-Processing Module (MPM) — Your Apache configuration uses MPM Prefork. The MPM that you select determines how Apache handles requests.
  • PHP — Your Apache configuration includes PHP versions 5.5, 5.6, and 7.0 by default. Read our PHP Home documentation for more information. 

Apache modules

Default Apache modules

The cPanel Default profile includes the following Apache modules by default:

Module nameDescriptionVendor
mod_cgiHandles CGI requests. Docs
mod_deflateCompresses content before delivery to the client.Docs
mod_expiresGenerates Expires and Cache-Control HTTP headers with to user-specified criteria.Docs
mod_headersCustomization of HTTP request and response headers.Docs
mod_mpm_preforkImplements a non-threaded, pre-forking web server.Docs
mod_proxyHTTP/1.1 proxy/gateway server.Docs
mod_proxy_fcgiFastCGI proxy module for the Apache HTTP server.Docs
mod_ruid2Allows a domain's HTTP requests to run as the owner of that domain.Docs
mod_security2
A web application firewall.Docs
mod_sslHandles security through the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols.Docs
mod_unique_idProvides an environment variable with a unique identifier for each request.Docs

Other available Apache modules

You can select other Apache modules in the Apache Modules section of WHM's EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4) when you customize a profile. 

 Click here to view the full list of Apache modules...
Module nameDescriptionVendor
mod_allowmethodsRestrict which HTTP methods the server can use. Docs
mod_asisAs-is provider module for the Apache HTTP server.Docs
mod_auth_digestHTTP Digest Authentication module for the Apache HTTP server.Docs
mod_authn_anonAnonymous-user authentication module for the Apache HTTP server.Docs
mod_authn_dbdDBD-based authentication module for the Apache HTTP server.Docs
mod_authn_dbmDBM-based authentication module for the Apache HTTP server.Docs
mod_authn_socache Shared-memory authentication caching module for the Apache HTTP server.Docs
mod_authnz_ldap LDAP authentication/authorization module for the Apache HTTP server.Docs
mod_authz_dbd DBD-based group authorization module for the Apache HTTP server.Docs
mod_authz_dbm DBM-based group authorization module for the Apache HTTP server.Docs
mod_authz_owner Ownership-based authorization module for the Apache HTTP server.Docs
mod_buffer Request buffering module for the Apache HTTP server.Docs
mod_brotli

Compression module for the Apache HTTP server.

Note:

If you install this module, it applies to all virtual hosts.

Docs
mod_bw

Bandwidth limitation options for the Apache HTTP server.

Note:

This module uses the  /usr/local/cpanel/scripts/setbwlimit  script to modify bandwidth limits. For more information, run the  /usr/local/cpanel/scripts/setbwlimit --help  command. 


Docs
mod_cache Content caching module for the Apache HTTP server.Docs
mod_cache_disk Disk-based caching module for the Apache HTTP server.Docs
mod_cache_socache Shared-memory caching module for the Apache HTTP server.Docs
mod_cgid CGI module for the Apache HTTP server.Docs
mod_charset_lite Character set conversion module for the Apache HTTP server.Docs
mod_cpanel Improves how Apache processes requests.Docs
mod_data RFC2379 data URL generation module for the Apache HTTP server.Docs
mod_dav

DAV module for the Apache HTTP server.

Docs
mod_dav_fs

DAV filesystem provider module for the Apache HTTP server.

Docs
mod_dav_lock Generic DAV locking module for the Apache HTTP server.Docs
mod_dbd Database connection module for the Apache HTTP server.Docs
mod_dialup Bandwidth rate limiting module for the Apache HTTP server.Docs
mod_dumpio Debug logging module for the Apache HTTP server.Docs
mod_env Environment variable module for the Apache HTTP server.Docs
mod_evasive DoS, DDoS, and brute force attack protection for the Apache HTTP server.Docs
mod_ext_filter Generic filter module for the Apache HTTP server.Docs
mod_file_cache Static file caching module for the Apache HTTP server.Docs
mod_heartbeat Status reporting module for the Apache HTTP server.Docs
mod_heartmonitor Heartbeat monitoring module for the Apache HTTP server.Docs
mod_http2 The http2 module for the Apache HTTP server.Docs
mod_imagemap Server-side imagemap module for the Apache HTTP server.Docs
mod_info Provides a comprehensive overview of server configuration. We do not recommend this module for shared servers.Docs
mod_lbmethod_bybusyness Busyness load-balancing module for the Apache HTTP server.Docs
mod_lbmethod_byrequests Request load-balancing module for the Apache HTTP server.Docs
mod_lbmethod_bytraffic Traffic load-balancing module for the Apache HTTP server.Docs
mod_lbmethod_heartbeat Heartbeat load-balancing module for the Apache HTTP server.Docs
mod_ldap LDAP connection-handling module for the Apache HTTP server.Docs
mod_log_debug Debug logging module for the Apache HTTP server.Docs
mod_log_forensic Forensic logging module for the Apache HTTP server.Docs
mod_lua

The Lua language extension module for the Apache HTTP server.

Warning:

We do not recommend this module for shared servers.

Docs
mod_macro Configuration macro module for the Apache HTTP server.Docs
mod_mime_magic MIME-type autosensing module for the Apache HTTP server.Docs
mod_proxy_ajp Apache JServ Protocol 1.3 proxy module for the Apache HTTP server.Docs
mod_proxy_balancer Load-balancing module for the Apache HTTP server.Docs
mod_proxy_connect CONNECT HTTP method proxy module for the Apache HTTP server.Docs
mod_proxy_express Dynamic reverse-proxy module for the Apache HTTP server.Docs
mod_proxy_fdpass File descriptor-passing proxy module for the Apache HTTP server.Docs
mod_proxy_ftp FTP proxy module for the Apache HTTP server.Docs
mod_proxy_hcheck Dynamic health check of Balancer members (workers) for mod_proxy.Docs
mod_proxy_html HTML and XML content filters for the Apache HTTP server.Docs
mod_proxy_http HTTP/HTTPS proxy module for the Apache HTTP server.Docs
mod_proxy_scgi SCGI module for the Apache HTTP server.Docs
mod_proxy_wstunnel Websockets proxy module for the Apache HTTP server.Docs
mod_ratelimit Client bandwidth limiting module for the Apache HTTP server.Docs
mod_reflector Filter-as-service module for the Apache HTTP server.Docs
mod_remoteip IP address replacement module for the Apache HTTP server.Docs
mod_reqtimeout Request timeout module for the Apache HTTP server.Docs
mod_request Request body retention module for the Apache HTTP server.Docs
mod_sed Regex replacement content filter module for the Apache HTTP server.Docs
mod_sessionSession interface for the Apache HTTP server.Docs
mod_slotmem_plainSlot-based memory module for the Apache HTTP server.Docs
mod_socache_memcache

Memcache-based object cache module for the Apache HTTP server.

Docs
mod_spelingURL fallback module for the Apache HTTP server.Docs
mod_substituteResponse body substitution module for the Apache HTTP server.Docs
mod_suexecPer-user/group execution module for the Apache HTTP server.Docs
mod_suphpThis module executes PHP scripts with the permissions of their owners.Docs
mod_usertrackCookie tracking module for the Apache HTTP server.Docs
mod_versionVersion comparing module for the Apache HTTP server.Docs
mod_vhost_aliasDynamic mass virtual hosting module for the Apache HTTP server.Docs
mod_watchdogPeriodic task module for the Apache HTTP server.Docs

Apache security

We strongly recommend that you read Apache's Security Tips documentation.

EasyApache 4 provides a web application firewall, the ModSecurity™ Apache module.

Warning:

You must install and configure a ruleset to use ModSecurity. For more information on the ModSecurity Apache module, read our Apache Module: ModSecurity documentation.

Apache file locations

File or directory locationDescription
/etc/apache2/logs/error_logThe Apache error log.
/etc/apache2/conf.d/httpd.confThe primary Apache configuration file.
/etc/apache2/conf.d/The primary Apache configuration file directory.
/etc/apache2/conf.d/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 WHM's Include Editor interface (WHM >> Home >> Service Configuration >> Apache Configuration >> Include Editor).

For more information, read our Advanced Apache Configuration and Advanced Apache Configuration -- The paths.conf file documentation. 

Troubleshoot Apache

If Apache does not function correctly, we recommend that you perform the following steps to isolate the cause of the issue:

  • Build EasyApache 4 with the cPanel Default profile. If the issue no longer exists after the EasyApache build completes, then an option that you selected caused the issue.
  • If you modified your httpd.conf  file, create a backup copy of your configuration file and run the /scripts/rebuildhttpdconf script to set your Apache configuration to the default. If the issue no longer exists after the script completes, then the issue relates to a directive or custom entry inside the httpd.conf file.

  • If you modified any of the files in the /etc/apache2/conf.d/includes/ directory, create a backup copy of the files and then remove all entries from the files in the directory. Restart the Apache service with the service httpd restart command. If the issue no longer exists after the Apache service restarts, then an entry in one of the include files caused the issue.

Additional documentation