Introduction
The procedure outlined below will set up a Tomcat proxy for a subdomain.
Procedure
1) Create an Apache include file for your subdomain. For example, for a subdomain 'sub.domain.tld' on an account with username 'user':
/etc/apache2/conf.d/userdata/ssl/2_4/user/domain.tld/sub-tomcat.conf
Note: The above directory and include file will not exist by default. It will need to be created by the server's administrator.
2) Place the following in the include file:
<IfModule proxy_ajp_module>
ProxyPass "/" "ajp://127.0.0.1:11111/sub"
</IfModule>
In the above example, '11111' is the actual AJP port number for the user. 'sub' is the subdomain name.
3) Rebuild the Apache configuration and restart Apache:
/usr/local/cpanel/scripts/rebuildhttpdconf
/usr/local/cpanel/scripts/restartsrv_httpd
Please also refer to cPanel's documentation on this task below: