Apache Integration with Tomcat Apache

Application server performance like (Jboss / Tomcat) is slower than webservers like (IIS / Apache ).

Jboss : Java based application server (J2EE)
Tomcat : Java servlet engine.
Tomcat Apache is an open source application server written in Java, The default port for  java application server is 8080 and apache 80.

In order to integrate apache as front-end and application server as back-end, required proxy module or mod_jk connector.
In our example we are configuring Tomcat Apache  using proxy gateway between apache and Apache Tomcat application server as part of installation and configuration.

Proxy : ProxyPass and ProxyPassRevers(proxy_module modules/mod_proxy.so).

Proxy module redirect the request received on port 80 to 8080 internally which will not be visible to users.
Apache  Tomcat   installation and configuration guide has prepared on following platform and services.

Operating System          : CentOS release 6.5 (Final) 32bit
Webserver                 : httpd-2.2.15-29.el6.centos.i686
Jboss                     : apache-tomcat-6.0.39
                    : demo.com
Aapache Tomcat  server IP :
Scope              : Apache integration with Apache Tomcat using (mod_proxy)

Centos / Redhat Box : 1 No’s ( virutal / Physical)

Packages            : httpd-2.2.15-29.el6.centos.i686 , JDK ( jdk-7u51-linux-x64.rpm) , apache-tomcat-6.0.39

Steps :

Step 1: Install and configuring JDK, Apache & Apache Tomcat webserver.

Step 2: Apache integration with Apache Tomcat configuration

Step 3: Verifying

Step 1: Install and configuring jdk, Tomcat Apache webserver  .


Login as root user to
Install apache rpm package from repository using yum command line utility.

[root@experts ~]#yum install http httpd-devel

start apache service and set service on at boot level

[root@experts ~]#chkconfig httpd on

download latest jboss from jboss.org website suitable to meet your requirements. in our guide we are going to use apache-tomcat-6.0.39

[root@experts ~]#mkdir /apps

[root@experts ~]#cd /apps

[root@experts apps]#wget http://psg.mtu.edu/pub/apache/tomcat/tomcat-6/v6.0.39/bin/apache-tomcat-6.0.39.tar.gz

Extract apache-tomcat source package
[root@experts apps]#tar -zxvf apache-tomcat-6.0.39.tar.gz

Download jdk and install , in our guide we have already downloaded in /opt/
you can download suitable jdk from http://www.oracle.com/technetwork/java/javase/downloads/

[root@experts ~]#cd /opt

[root@experts ~]#rpm -ivh jdk-7u45-linux-i586.rpm

[root@experts ~]#java -version

set  JAVA_HOME and PATH environment in .bash_profile

[root@experts ~]#vi /root/.bash_profile

export JAVA_HOME=/usr/java/jdk1.7.0_45


export PATH

Save and Exit.

[root@experts ~]#source /root/.bash_profile

Verify JAVA_HOME environment .

[root@experts ~]#env |grep JAVA_HOME



Step 2: Apache integration with Apache Tomcat configuration


Edit the Apache configuration file to specify ProxyPass and ProxyPassRevers context as shown below.

[root@experts ~]#vi /etc/httpd/config/httpd.conf

ProxyRequests Off

ProxyPass /examples http://localhost:8080/examples

ProxyPassReverse /examples



<Location “/examples”>

Order allow,deny

Allow from All


Save & Exit.


Tomcat Apache configuration files and locations as show below.

/apps/apache-tomcat-6.0.39/bin : Start and Stop scripts

/apps/apache-tomcat-6.0.39/lib : Drivers ODBC and MYSQL

/apps/apache-tomcat-6.0.39/logs : Logs

/apps/apache-tomcat-6.0.39/webapps : application container

/apps/apache-tomcat-6.0.39/conf    : Apache Tomcat configuration files.


Start Apache Tomcat service using below command

[root@experts ~]cd /apps/apache-tomcat-6.0.39/bin

[root@experts ~] ./startup.sh

Shutdown Apache Tomcat service using below command

change the directory structure to jboss script location

[root@experts ~]cd /apps/apache-tomcat-6.0.39/bin

[root@experts ~]./shutdown.sh

Step 3: Verifying

Open the browser from a client machine and invoke the url :

the above URL must be accessible without suffix of port number 8080.

Thanks for watching, for more details visit www.demo.com

For more Detail refer Video :

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 4