Apache Web Server connect to Tomcat

Posted on 2005-05-11
Last Modified: 2010-04-20
We have a client want their web application to be run on Apache Web server with tomcat as a middle tier. I need to report to my manager about this.
I have tried and successfully installed Apached and Apache Tomcat. Both works BUT I follow some document to connect Tomcat to Apache, it DOES NOT WORK.

Are there any installer I can use?
I go through the Apache document but it still does not work..I think I must miss somthing..


Let's say if I can connect Tomcat to Apache, where do I deploy my web application?
at the moment, my application is located $TOMCAT_HOMR/webappl/HR folder.

I dont know how it work.

Please help

The version i use for Apache Server is Apache 2.0.53 (win)
Apache Tomcat 5.59

Question by:LeanMoreTryMore
    LVL 23

    Expert Comment


    Complete instructions are available at

    Here's a (minimal) configuration example.
    It dispatches all requests for the 'examples' context
    to Tomcat.
    My setup is Apache 1.3.x/Tomcat 4.0.x on RH7.2. The
    example should also be valid for your setup.

    1. In httpd.conf, tell Apache to load the module:
    LoadModule jk_module modules/

    2. In httpd.conf, configure mod_jk:
    JkWorkersFile /etc/httpd/conf/
    JkLogFile /var/log/httpd/mod_jk.log
    JkLogLevel info
    JkLogStampFormat "[%a %b %d %H:%M:$S %Y] "
    JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
    JkRequestLogFormat "%w %V %T"
    JkMount /examples/* worker1

    3. Configure workers for mod_jk in


    4. In server.xml, configure Tomcat to talk to mod_jk:
    <Service name="Tomcat-Standalone">
       <!-- this is the HTTP connector which was configured
            in the server.xml that came with Tomcat
      <Connector className="org.apache.catalina........ />

      <!-- This makes Tomcat talk to mod_jk -->
      <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                 address="" />


    If you don't want to access Tomcat directly via HTTP, you
    can comment out the entry for the HttpConnector.

    After a restart of Tomcat and Apache, Apache should
    dispatch requests for the 'examples' context to Tomcat.


    Author Comment

    Is our web application reside in the $TOMCAT_HOME/webapp or in $APACHE_HOME?

    Author Comment

    Refer to your tomcat connector setting,

    Is the port 9009 a Apache port?
    address =  <=== Let's say i want to install apache web server on my pc, the address is my PC address, isn't it?
    LVL 51

    Accepted Solution

    port 9009 is the internal port where web server (apache) and application server (tomcat) comunicate. so to answer your question: 9009 is tomcat's listen port is localhost where to connect on 9009, for security reason this should always be localhost ( which is not accessable from anywhere else (assuming apache and tomcat on same computer)

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now