This guide assumes you've already successfully set up Tomcat 8.5 with an Apache include; if not, you can review the articles:
Tomcat 8 and EasyApache Setup Guide
How to proxy from Apache to Tomcat
You will also need to set up each application on separate virtual hosts (domains).
We will create three add-on domains on the account with tomcat already set up.
tomcat1.dev
tomcat2.dev
tomcat3.dev
Information to set up an addon domain name:
https://docs.cpanel.net/cpanel/domains/addon-domains/
Next, we will create the document roots for our tomcat applications.
Note: The folders have to be created as the user, not root.
mkdir /home/tcattest/ea-tomcat85/webapps/ROOT/tomcat1.dev
mkdir /home/tcattest/ea-tomcat85/webapps/ROOT/tomcat2.dev
mkdir /home/tcattest/ea-tomcat85/webapps/ROOT/tomcat3.dev
Now you need to create the Apache include for each domain.
How to proxy from Apache to Tomcat
Now we need to edit /home/tcattest/ea-tomcat85/conf/server.xml for the tomcat application.
After the </Host> you would need to add the lines below (edit as required):
<Host name="tomcat1.dev" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Alias>www.tomcat1.dev</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="tomcat1-dev-access-log" suffix=".txt"
pattern="%h %l %u %t %r %s %b" />
<Context path="" docBase="/home/tcattest/ea-tomcat85/webapps/ROOT/tomcat1.dev"
debug="0" reloadable="true"/>
</Host>
<Host name="tomcat2.dev" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Alias>www.tomcat2.dev</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="tomcat1-dev-access-log" suffix=".txt"
pattern="%h %l %u %t %r %s %b" />
<Context path="" docBase="/home/tcattest/ea-tomcat85/webapps/ROOT/tomcat2.dev"
debug="0" reloadable="true"/>
</Host>
<Host name="tomcat3.dev" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Alias>www.tomcat3.dev</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="tomcat3-dev-access-log" suffix=".txt"
pattern="%h %l %u %t %r %s %b" />
<Context path="" docBase="/home/tcattest/ea-tomcat85/webapps/ROOT/tomcat3.dev"
debug="0" reloadable="true"/>
</Host>
Restart tomcat
su - tcattest -s /bin/bash -c 'ubic restart ea-tomcat85'
Lastly, you would add your tomcat application to the created document roots for each tomcat application. You can use the test application in our guide Tomcat 8 and EasyApache Setup Guide
For additional assistance, you should reach out to your system administrator or hire a qualified system administrator. You can find a qualified system administrator on our website here: