Tomcat 5.5 with Apache 2.0 Integration in 5 Simple Steps

By Angsuman Chakraborty, Gaea News Network
Wednesday, May 4, 2005

The simplest configuration is described. It assumes you already have Tomcat 5.5 and Apache 2.0 (instructions for Apache 1.3 is also provided) installed and running.
The instructions are applicable (have been tested) for Windows as well as Linux platform.

Assume you want to map test directory of Apache to the mytest web application of Tomcat. Change the name appropriately to suit your configuration.

1. Shutdown Apache & Tomcat Server

2. Add the following lines to httpd.conf (in conf directory of Apache base directory)

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyPass /test/ https://localhost:8081/mytest/
ProxyPassReverse /test/ https://localhost:8081/mytest/

Note: Replace localhost with the appropriate IP address or hostname of the server where Tomcat is installed.

Note 2: On older Apache 1.3 you will have to use libproxy.so instead:

LoadModule proxy_module modules/libproxy.so
AddModule mod_proxy.c

Discussion

tibuser
December 2, 2010: 9:25 am

Somebody can update that please?
I don’t see step 3 to 5.

Thanks


Sandro Regis
August 20, 2010: 5:40 pm

Buddy! I would like to thank you so much on share this so helpfull information regarding Apache x Tomcat integration!

Thanks again!

=0)

Sandro Regis (Brazil)


Jared C
February 9, 2010: 9:03 pm

The addition to Server.xml in step 3 does not display in Firefox or Safari (because it looks like an HTML tag). It is present in the source of the web page. Maybe it will display in my comment… :


rajamukesh
March 12, 2009: 2:32 pm

what detail can we add in server.xml which was mentioned in step 3


alvarezg
April 23, 2008: 5:47 pm

Add one more to the WOW list… I’m an experienced JAVA developer and I’ve done this with mod_jk before… it is a pain!!! Thanks you so much…


gaurav
March 11, 2008: 3:54 pm

but when i did that it is giving me 503 error

wat wud be the problem


GK
January 8, 2008: 3:19 pm

I am also in the WOW!!! category of response. Very direct and easy to do — especially after following numerous other instructions.

September 30, 2007: 1:47 am

I am using Tomcat 6.0.14 and Apache Httpd 2.0.59 and has no luck at all. Tried this tutorial not work at all. Can someone kindly assist? Thanks !


Ashok Parmar
September 21, 2007: 4:30 am

Works fine!!!! ;)
Thanks !!!! :)


A. Lepe
September 2, 2007: 6:48 pm

WOW!!! that is what I was looking… a easy and straightforward way to connect Apache+Tomcat.
I tried to use the mod_jk and I finished with more problems… Do you know if this way have any security problems?

Thank you!!!

August 12, 2007: 10:19 am

We can provide (paid) support. Please contact using the contact form if you are interested.


rajat
August 9, 2007: 12:13 am

Hey man, i am not getting the abc of this.
PLz figure it out inside which tag i have to embedd these contents.
Plz tell me the complete scenario.
i have tomacat and http2.2.4.
My aim is to set the http header in tomcat for all the sites.
Early response is highly appreciated.


sridhar
March 28, 2007: 2:28 am

please tell me
is there any disadvantage of using this simple 5 steps of integrating tomcat with apche.

is there any advantage of using mod_jk connector over this proxy pass usage.

This seems that just diverting/forwarding to the tomcat ports.

please give me clarification. it is urgent for me. i need to integrate to my development server later it will go to production server

September 25, 2006: 11:08 am

[...] Solutions Previouly I had described a much simpler way to integrate Tomcat 5.5 with Apache 2.x, in just 5 steps. [...]


Manisekaran
September 7, 2006: 5:27 am

it is great idea for developers
manisekar


rajkiran
February 7, 2006: 11:26 pm

hi,

can any one help me, i tryed these 5 steps but it did not work for me, please help me out.

Thanking you


ken
November 27, 2005: 6:50 pm

anyone got an article using the mod_jk connector?

November 9, 2005: 10:31 pm

[...] 5 Simple Steps to Integrate Tomcat 5.5 with Apache 2.0 - não recomendo, já que o conteúdo estático também será manipulado pelo Tomcat. [...]

May 4, 2005: 7:34 pm

Works fine!! Thanks !! :-)

No more mod_jk2 and integration problems …

May 4, 2005: 7:30 pm

Works fine!! Thanks !! :-)

No more mod_jk2 and integration problems …

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :