tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Tomcat and Apache on Separate servers
Date Tue, 06 Jan 2004 06:46:13 GMT
At 01:36 AM 1/6/2004 -0500, you wrote:

>Hi All,
>I have what I hope will be a simple question.  I have 2 Win 2K boxes.  One
>running Tomcat and the other Apache.
>How do I deploy a web app on the Tomcat server and configure it to talk to
>the Apache web server on a completely separate box.
>Do I need to configure both ends?  Does it make sense to split the boxes
>this way just to have Apache server static files?

Here's a copy of information from the list a while back.  I would post the 
url to the archived message, but I don't have that at the 
moment.  Attribution of this solution goes to the original poster, not 

Here it goes.................

Machine  A (Apache), Machine B (tomcat)

httpd.conf changes...
Below # LoadModule foo_module modules/

Add following lines
# Load mod_jk
  LoadModule jk_module libexec/
# Configure mod_jk
JkWorkersFile conf/
JkLogFile logs/mod_jk.log
JkLogLevel debug

Below DocumentRoot "/usr/local/apache/htdocs"

Add following lines...

JkMount /examples ajp13
JkMount /examples/* ajp13

(if you want to configure a application examples running under webapps
on tomcat, just specify  /examples, you need not sepcify the full path
of the application)

Then create under $Apache_Home$/conf/  like this

# In Unix, we use forward slashes:

# list the workers by name

worker.ajp13.port=8009(ajp13 port from server.xml on tomcat machine) B)

(no need to define tomcat_home and java_home parameters here, you define
them on on tomcat machine)

this is all you need to do on apache machine.......

server.xml changes on  Machine B(tomcat machine)

Set the required environment variables JAVA_HOME AND CATALINA_HOME in

Commen out the Standalone HTTP port(port 8080) Connector.

                port="8080" minProcessors="5" maxProcessors="75"
                enableLookups="true" redirectPort="8443"
                acceptCount="10" debug="0" connectionTimeout="60000"/>

Also Comment out the WARP connector

   <Service name="Tomcat-Apache">
      port="8008" minProcessors="5" maxProcessors="75"
      enableLookups="true" appBase="webapps"
      acceptCount="10" debug="0"/>

Change the both the <Engine> Tag and <Host> tag defaultHost to tomcat
(This should match with your host name.)

<Engine name="Standalone" defaultHost="" debug="0">
   <Host name="" debug="0" appBase="webapps"

start tomcat and apache, you should be able to access examples from
apache machine....

I have pretty much followed the
documentation......many many thanks to Pascal Forget.

Let me know, how it goes...............


>Thanks for your time,
>Tomcat-Apache "Newbie"
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message