Tomcat 5.5 with Apache 2.0 Integration in 5 Simple Steps

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

3. Add to Server.xml (in conf directory of Tomcat base directory)
<Connector port=”8081″ proxyPort=”80″ proxyName=”www.example.com” />

ARTICLE CONTINUED BELOW

Note: Change the proxyName to the server name served by Apache. For example if you want to access the application at http://www.example.com/test/, then proxyName should be www.example.com.

4. Restart Tomcat Server and then Apache Server

5. Test the URL.

6. Have a cup of Java and relax.
BTW: That’s not actually a required step, but what the heck.

You are done!

Note: This is the simplest way to integrate the two servers. However in this configuration the static pages are also served by Tomcat. This is not so bad with the recent performance improvements in Tomcat 5.5. If you still want Apache to serve your static pages then welcome to jk connector hell.

Discussion

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 :