If you want to enable tomcat for temporary/testing URL then refer below steps :
1] root@server[#] vi /usr/local/jakarata/tomcat/conf/server.xml
Add the below code in the server.xml file for virtual host entry below the alias tab as ::
<Host name="domian.com" appBase="/usr/local/apache/htdocs"> <Alias>www.domian.com</Alias>
Add the below code
<Listener className="org.apache.catalina.startup.UserConfig" directoryName="public_html" homeBase="/home" userClass="org.apache.catalina.startup.HomesUserDatabase"/>
docBase="/usr/local/apache/htdocs" debug="1"/> <Context path="/manager" debug="0" privileged="true" docBase="/usr/local/jakarta/tomcat/server/webapps/manager"> </Context> </Host>
Save and quit.
2] Then open the httpd.conf file and search the virtual host entry for the server’s hostname and add the line.
For Apache 1 :
Include "/usr/local/apache/conf/userdata/std/1/nobody/hostname/*.conf"
For Apache 2 :
Include "/usr/local/apache/conf/userdata/std/2/nobody/hostname/*.conf"
For example :
ServerName hostname DocumentRoot /usr/local/apache/htdocs ServerAdmin cpanel@domain.comsuPHP_UserGroup nobody nobodyInclude "/usr/local/apache/conf/userdata/std/1/nobody/hostname/*.conf"
Same for https
ServerName hostname DocumentRoot /usr/local/apache/htdocs ServerAdmin cpanel@domain.comsuPHP_UserGroup nobody nobodyInclude "/usr/local/apache/conf/userdata/std/1/nobody/hostname/*.conf"
save and quit.
3] After that create the folder
root@server[#] mkdir -p /usr/local/apache/conf/userdata/std/1/nobody/hostname/
root@server[#] vi /usr/local/apache/conf/userdata/std/1/nobody/hostname/cp_jkmount.conf
Then insert the below code:
<IfModule mod_jk.c> JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 JkMount /servlets/* ajp13 JkMount /*.* ajp13 JkMount /* ajp13 JkMount /*.jspx ajp13 </IfModule>
Save and Quit.
Note : Restart Tomcat and Apache services.
Note : Replace “hostname” with your server original host name.
