We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.
We will continue to maintain our API documentation on this server.
This document only applies to Tomcat in cPanel & WHM version 76 and later.
Apache Tomcat® allows you to serve Java-based applications. EasyApache 4 provides the option to install Tomcat 8.5.
For more information about the Apache Tomcat open-source project, visit the Apache Tomcat website.
root-level access to install.
To install Tomcat, use WHM's EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4). Tomcat appears in the Additional Packages section.
To install Tomcat, run the following command on the command line as the
To uninstall Tomcat, use WHM's EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4). Tomcat appears in the Additional Packages section.
To uninstall Tomcat, run the following command on the command line as the
In EasyApache 4, Tomcat runs as a per-user private instance. This increases security and allows the user to manage their own Tomcat services, but increases memory load on the server. We strongly recommend that you consider your server's configuration carefully before you enable Tomcat for many users. For more information, read our Tomcat Private Instances documentation.
Tomcat 8.5 places its configuration files in the following location, where
user represents the name of the user for which you installed Tomcat:
EasyApache 4 makes the following configuration changes to the default Tomcat 8.5 behavior in the
xpoweredByattribute of all Connectors to a
ErrorReportValueclass to all Hosts with the
showServerInfovalue set to a
You may need to make additional security changes, depending on your system's Tomcat requirements. For more information, read Tomcat's Security Considerations documentation.
To add Tomcat 8.5 support to a user, use WHM's Tomcat Manager interface (WHM >> Home >> Software >> Tomcat Manager).
To add Tomcat 8.5 support to a user, run the following command as the
/usr/local/cpanel/scripts/ea-tomcat85 script accepts the following arguments, where
user represents the user you wish to change and
command represents an argument for the script:
Add Tomcat 8.5 support to a user.
Remove Tomcat 8.5 support from a user.
|View the users with a Tomcat 8.5 instance.|
Display the abbreviated help information.
Display the script's help information.
Jailshell users cannot see the status of their previously started Tomcat service. The default jailshell permissions only allow users to view their current session's processes. If they attempt to restart an already active service with Ubic, the system will launch a duplicate process.
You can address this behavior with one of the following actions:
If you enable this functionality, a jailshelled user can see all running processes. This can allow the jailshell user to break out of their shell.
If you do not enable this setting, Ubic will stop the Tomcat service when you exit the shell.
Tomcat may take a long time to start to serve requests on initial startup. This usually happens on virtual machines. For suggestions of ways to start your Tomcat server faster, read the Tomcat Faster Startup documentation. System administrators must choose the solution that best fits their needs.
When you add a user with either WHM's Tomcat Manager interface (WHM >> Home >> Software >> Tomcat Manager) or the
/usr/local/cpanel/scripts/ea-tomcat85 script, the script creates an environment that the user can configure for their unique requirements.
When a you assign Tomcat access to a cPanel user, the script assigns two ports to the user. You can find these port assignments in the
/etc/cpanel/cpuser_port_authority.json file and the user's
You must configure any custom behavior manually. To change how Tomcat interacts with Apache, edit or create the appropriate file in the
/etc/apache2/conf.d/userdata/ directory. For more information, read our Advanced Apache Configuration and Modify Apache Virtual Hosts with Include Files documentation.
Tomcat 8.5 can use AJP to serve applications in EasyApache 4. For more information, read our Tomcat Proxies documentation.
Versions of LiteSpeed earlier than 5.3.5 (build 6) are not compatible with the
ProxyPassMatch directive. This causes LiteSpeed to not proxy from the assigned port to port
80. Update your LiteSpeed server to a newer, compatible version or use the Tomcat instance's assigned port.
EasyApache 3 handles Tomcat differently than EasyApache 4. EasyApache 4 provides Tomcat 8.5, rather than Tomcat 7.
In EasyApache 3, Tomcat existed as a shared service and all applications ran as the
tomcat user. The server created a container within a shared
In EasyApache 4, Tomcat runs as a per-user private instance and allows the user to configure their instance themselves. Tomcat runs as the individual user, rather than as the
tomcat user. This increases security and places management of the Tomcat instance in the user's control, but may affect your server's performance due to the memory requirements. For more information, read our Tomcat Private Instances documentation.
For more information about managing services in Tomcat, read our The cpuser_service_manager Script and the Ubic Subsystem documentation.
There is no content with the specified labels
There is no content with the specified labels