How to enable tomcat support for your add on domain in the cPanel

How to run the jsp for addon domain.
If you want to run the .jsp pages for the addon domain in cPanel.

Reach to the Tomcat config folder and open the server.xml file
root@server[#] cd /usr/local/jakarta/tomcat/conf/
root@server[#] vi server.xml

Add these lines to the server.xml file
<Host name=”domain.com” appBase=”/home/username/public_html/domain.com”>
<Alias>www.domain.com</Alias>
<Context path=”” reloadable=”true” docBase=”/home/username/public_html/domain.com” debug=”1″/>
<Context path=”/manager” debug=”0″ privileged=”true”
docBase=”/usr/local/jakarta/tomcat/server/webapps/manager”>
</Context>
</Host>

Please save the file and quite from file
After ward please restart the Tomcat.

How to restart the tomcat services
Please find the below command to restart the Tomcat Services
root@server[~]# /usr/local/jakarta/tomcat/bin/./shutdown.sh
root@server[~]# /usr/local/jakarta/tomcat/bin/./startup.sh
root@server[~]# /usr/local/jakarta/tomcat/bin/./catalina.sh run
root@server[~]# /scripts/restartsrv_tomcat

 

About the Author

avatar