Apache FAQ
Why does Apache 2.4 require cPanel & WHM 11.36 or newer?
When we release a major version of cPanel & WHM, we do not introduce new functionality or features until the next major version. Instead, we restrict updates within a published major version to security issues, bug fixes, and other critical issues. The functionality needed by cPanel & WHM to properly support Apache 2.4 does not fall into any of those categories. As a result, Apache 2.4 was not compatible until 11.36 was published.
What are the functionality changes to Apache 2.4?
Apache 2.4 introduced many changes into the configuration of Apache. Apache 2.4 also introduced, renamed, and removed several directives.
cPanel & WHM servers use AdvConfig to manage the Apache configuration file (
httpd.conf). To give our customers the best experience with Apache 2.4, we updated AdvConfig to handle both upgrades and downgrades for Apache.
The changes needed for Apache 2.4 to function are available beginning with cPanel & WHM 11.36.
How do I remove Tomcat?
- Disable Tomcat in Home >> Service Configuration >> Service Manager
- Remove Servlets from any domain that has them installed. You can do this using this command
/usr/local/cpanel/scripts/remservlets
- Delete the following directories.
-
rf /usr/local/jakarta/tomcat
-
rf /usr/local/jakarta/apache-tomcat
Warning: This will permanently delete
all Tomcat configuration data. Back up any customizations before you delete these directories.
How can I configure Apache to serve Java Servlet and Java Server pages?
Tomcat is required to serve Java Servlet and Java Server pages with Apache. To enable Tomcat, the server owner will need to rebuild Apache with Tomcat enabled. You can do so under the
EasyApache (Apache Update) section in WHM
(Home >> Software >> EasyApache (Apache Update)). Visit the
EasyApache documentation for more information.
After installing Tomcat, you can enable Servlets for a domain by selecting the domain from the list displayed in WHM
(Home >> Account Functions >> Install Servlets).
Note: The
Install Servlets function is not available in WHM until Tomcat has been installed.
You can find more information at the
Tomcat website
What is the cPanel and Apache page that I see at my domain?
This is a placeholder page for Apache. Contact your web host so they can ensure that your VirtualHost is properly configured in Apache's configuration file.
Why is Apache is restarting every 10 minutes?
This is normal behavior.
Cpanellogd sends a
SIGUSR1 (graceful restart) every ten minutes to Apache for log rotation and stats processing.
How can I add or remove support for features like PHP or Java server pages to my Apache webserver?
EasyApache is used to add or remove support for features from the Apache webserver.
- EasyApache can be accessed through WHM at (Home >> Software >> EasyApache)
- EasyApache can also be run from the command line with the command:
/scripts/easyapache
Why does Apache crash with this error: [notice] child pid x exit signal File size limit exceeded (25) ?
This usually means that a log file has grown too large for the system (generally 2GB). To address this issue, run the following scripts:
/scripts/upcp
/scripts/biglogcheck
If you have extremely large or active sites that reach this limit quickly, consider upgrading to a 64bit OS, or disabling logging for that site altogether. If you disable logging, you will gain a small speed increase, and avoid this error.
Note: If you disable logging, you will not be able to generate statisitics for the domain.
Why am I receiving the notice: HTTP Error code: 206 Partial content?
To find out why you are receiving this message, SSH into the server with root access and enter
tail -f /usr/local/apache/logs/error_log
Refresh the page and you will see an error message in your SSH session.
Apache dummy requests
Apache occasionally needs to wake processes listening for new connections. To do so, it uses dummy requests. A dummy request is an HTTP request that Apache sends to itself. These requests, when used without SSL, appear in access log files with the remote address set to the local host (127.0.0.1 for IPv4 or ::1 for IPv6). These dummy requests are a normal part of Apache's functionality that can be ignored.
Apache's dummy requests cannot use SSL. It is possible that servers with hosts that use SSL can receive noise in the log file that resembles the following:
On a lightly loaded server,
WHM's Apache Status feature
( Home >> Server Status >> Apache Status) will frequently show a high number of dummy connections. This occurs because the feature shows the last request to a worker slot, which is typically a dummy request waking a process so that the process can be reaped.
How do I customize how Apache treats certain types of files?
This is handled by
mod_MIME. The
AddHandler and
AddType directives are used to tell Apache that particular file extensions should be treated certain ways. Visit the
Apache website to learn more about them. You may also be interested in reviewing our
Scripts and Scripting FAQ.
WHM & cPanel with PHP 5
Remember: WHM & cPanel no longer supports PHP 4. We recommend that you update your site scripts to a version that is compatible with PHP 5.
Note: PHP 4 is available as an unsupported custom optional module that you can download and install.
How do I upgrade from PHP 4 to PHP 5, and what changes need to be made?
You can upgrade from PHP 4 to PHP 5 by recompiling PHP during the Apache build process. You can start the Apache build process in WHM under
(Home >> Software >> EasyApache (Apache Update)), or from the command line with the command
/scripts/easyapache
You will need to make sure that the PHP programs and scripts you wish to run are compatible with PHP5.
Which version of PHP 5 is running problem-free now?
The answer to this depends upon which third-party extensions you need. For example, Zend Opt 3.3.0 and PHP 5.2.2+ may cause errors. As incompatibilities are identified, we document them in the EasyApache 3 interface. For example, the Suhosin patch is not compatible with Concurrent PHP, and is noted in the interface. We also run some dependency resolution before the build. This skips extensions that are known to be incompatible in case a user ignores the warning in the interface.
Which PHP version shows on the end user's cPanel?
The system default shows.
How do I install and activate Zend Optimizer?
You can install and activate Zend Optimizer by running
/scripts/installzendopt from the command line as root.
How do I install ImageMagic?
In cPanel & WHM version 11.34 and earlier, run the
/scripts/installimagemagick script as the
root user to install ImageMagick.
In cPanel & WHM version 11.36, we removed the
installimagemagick script from the cPanel & WHM system. We now provide a binary RPM package that will be used with cPanel & WHM. This package installs ImageMagick to the
/usr/local/cpanel/3rdparty directory.
- If you wish to use ImageMagick with Apache, we recommend that you install ImageMagick via a YUM repository. The basic packages can be installed via the command line using the following script:
-
yum -y install ImageMagick-devel ImageMagick-c++-devel
- If you require PHP bindings with Apache, these bindings can be installed via the PECL utility:
-
/usr/local/bin/pecl install imagick
- If you require Perl bindings for your distro's Perl (usually
/usr/bin/perl), you can also install them via YUM:
-
yum -y install ImageMagick-perl
Note: To use this method, Perl must not be excluded in /etc/yum.conf Perl exclusions are used whenever /usr/bin/perl is not the file shipped by the Perl RPM.
This information applies to both upgrades and fresh installs.
In cPanel & WHM version 11.38, we returned the
installimagemagickscript to the cPanel & WHM system.
Run the
/scripts/installimagemagick script as the
root user to install ImageMagick.