##Interate Tomcat with apache
###Firstly switched to the sudo bash
$sudo bash
###Install Apache web server
#apt-get install apache2
###Then install Apache Tomcat server #####1. Downoad the latest Apache binary distribution from
wget http://tomcat.apache.org/
#####2. Extract tarball to /opt
tar -zxf apache-tomcat-*.*.tar.gz -C /opt
#####3. Run tomcat server
cd /opt/apache-tomcat-*.*/bin
./startup.sh
#####4. To check Tomcat log
tail /opt/apache-tomcat-*.*/logs/catalina.out
###How to create virtual host in apache tomcat, follow below url
https://gist.github.com/lokesh-webonise/5821607
###Now, to integrate Tomcate with apache, we have to install JK module in apache #####To install jk module
#apt-get install libapache2-mod-jk
#####Restart apache server
#servive apache2 restart
#####Now create workers.properties file, know about workers http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
vim /etc/apache2/workers.properties
worker.list=worker1
worker.worker1.port=8009 ##ajp service port no.
worker.worker1.host=abc.example.com ##domain name
worker.worker1.type=ajp13
:wq!
#####Edit the workers.properties file path in jk module
#vim /etc/apache2/mods-available/jk.conf
JkWorkersFile /etc/apache2/workers.properties
.
.
.
:wq!
#####Create virtual host in apache
vim /etc/apache2/sites-available/abc.example.com
<virtualhost :80>
ServerName abc.example.com
jkmount /* worker1
</virtualhost>
#####then enable Vhost
ln -s /etc/apache2/sites-available/abc.example.com /etc/apache2/sites-enable
####Restart apache server
#/etc/init.d/apache2 restart
#####open url http://abc.example.com