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.
- For information about the development of the Apache web server, read Apache's HTTP Server Project documentation.
- For an introduction to the Apache web server, read Apache's Getting Started documentation.
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, you must upgrade any profile that contains an older 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:
Note:
The cPanel Default profile provides the basic components of a webserver. cPanel & WHM installs this profile by default on new installations.
Module name | Description | Vendor |
---|---|---|
mod_cgi | Handles CGI requests. | Docs |
mod_deflate | Compresses content before delivery to the client. | Docs |
mod_expires | Generates Expires and Cache-Control HTTP headers with to user-specified criteria. | Docs |
mod_headers | Customization of HTTP request and response headers. | Docs |
mod_mpm_prefork | Implements a non-threaded, pre-forking web server. | Docs |
mod_proxy | HTTP/1.1 proxy/gateway server. | Docs |
mod_proxy_fcgi | FastCGI proxy module for the Apache HTTP server. | Docs |
mod_ruid2 | Allows a domain's HTTP requests to run as the owner of that domain. | Docs |
mod_security2
| A web application firewall. | Docs |
mod_ssl | Handles security through the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. | Docs |
mod_unique_id | Provides 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.
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 with WHM's ModSecurity Configuration interface (WHM >> Home >> Security Center >> ModSecurity™ Configuration) to use ModSecurity. For more information on the ModSecurity Apache module, read our Apache Module: ModSecurity documentation.
Apache file locations
File or Directory location | Description |
---|---|
/usr/sbin/httpd | The Apache binary file. |
/var/log/apache2/ | This directory contains all the logs for the apache2 file and all the access logs. |
/etc/apache2/ | This directory contains the configuration directory for Apache and contains all directories for Apache includes, modules, and configuration files. This directory does not contain log files. Note: This directory uses the symlink to the |
/etc/apache2/conf/httpd.conf
| The 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 ). |
/usr/lib64/apache2/modules/ | This directory contains all of the dynamic modules for Apache. Note: Some servers use the |
/etc/apache2/logs/access_log/ | This file contains HTTP requests that the server received and that did not go to a domain. |
/etc/apache2/logs/domlogs/ | This directory contains a log of HTTP requests that the system routed to a domain. |
/etc/apache2/logs/error_log/ | This file contains error information. |
/var/www/html/ | This directory contains the document root for the server. It contains default pages that users can see. |
/etc/apache2/logs/ | This directory contains an alias to the /var/log/apache2/ directory. |
/etc/apache2/modules/ | This directory contains an alias to the /usr/lib64/apache2/modules/ directory. |
For more information, read our Advanced Apache Configuration documentation.
To see the symlinks that we assign for Apache paths, read our 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 thehttpd.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 theservice 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
There is no content with the specified labels