Apache Tomcat® allows you to serve Java-based applications on your Apache webserver. 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.
- You can only install Tomcat manually. You cannot migrate from EasyApache 3 to EasyApache 4 if your server runs Tomcat. We will add this functionality in cPanel & WHM version 76.
- We strongly recommend that only experienced Tomcat administrators install Tomcat.
- Tomcat is experimental at this time. You must install the The Experimental Repository to use Tomcat.
How to install Tomcat
root-level access to install.
To install Tomcat, run the following command on the command line as the
To uninstall Tomcat, run the following command on the command line as the
Tomcat 8.5 places its configuration files in the following location:
Add Tomcat support for a domain
To add Tomcat 8.5 support to a domain, run the following command as the
/scripts/ea-tomcat85 script accepts the following arguments, where
domain represents the domain you wish to change and
command represents an argument for the script:
|View the Tomcat 8.5 status of a domain.|
Add Tomcat 8.5 support to a domain, subdomain, parked domain, or addon domain.
You can also pass the
Remove Tomcat 8.5 support from a domain.
You can also pass the
|View the domains that support Tomcat 8.5.|
Rebuild the Apache configuration file then restart Apache and Tomcat 8.5.
You only need to use this option if you passed the
Display the abbreviated help information.
Display the script's help information.
The command is optional. If you specify a command, only that command's help information will display.
When you run the
/scripts/ea-tomcat85 script with the
rem arguments, the script will ensure that the proper include files exist. It will also perform the following steps:
- Rebuild the
- Restart Tomcat.
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 domain with the
/usr/local/cpanel/scripts/ea-tomcat85 script, the script configures the domain for
/usr/local/cpanel/scripts/ea-tomcat85 script will create include files and add an entry to the
/opt/cpanel/ea-tomcat85/conf/server.xml file. 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.
Do not manually edit the include files or the
server.xml file that the Tomcat script creates.
Proxy an app with AJP
Tomcat 8.5 uses AJP to serve applications in EasyApache 4.
To serve an app via AJP, you must configure AJP in your virtual host's include files. Your entry might resemble the following example, where
/docs represents the app you wish to use:
Differences between Tomcat in EasyApache 3 and EasyApache 4
EasyApache 3 handles Tomcat differently than EasyApache 4. EasyApache 4 provides Tomcat 8.5, rather than Tomcat 7.
EasyApache 4 uses the
mod_proxy_ajp Apache module rather than the
mod_jk connector. Due to security concerns, EasyApache 4 does not configure WAR file deployment the way that EasyApache 3 did. You can still use WAR files, but you must configure them manually.
There is no content with the specified labels