Solved

Connecting Tomcat 5.5 and Apache 2.2

Posted on 2006-11-29
4
1,563 Views
Last Modified: 2008-01-09
Hello,
  I'm new to Apache and Tomcat but a rush project requires that I set them up on a windows (Server 2003 R2) box.  I'm at a loss at how to get them to talk to each other.  All the documentation I've found seems to talk about configuration files and settings that don't exist anymore.  For instance, The Tomcat connector howto documentation (http://tomcat.apache.org/connectors-doc/howto/apache.html) mentions a mod_jk.conf-auto file that automates the apache configuration (sounds great) but it says it should be in my $TOMCAT_HOME/conf/jk dir but I don't have a jk directory in my conf directory.

Here's where I stand right now.
Apache 2.2 installed and running on 80
Tomcat 5.5 installed and running on 8080 and listening on 8009
jre-1_5_0_09 installed
mod_jk 1.2.19 for apache-2.2.3 for win32 (which inexplicably is a .so instead of a .dll) is sitting in my apache modules directory (also full of .so) looking sinister
 
 The Tomcat documentation for 5.5 (http://tomcat.apache.org/tomcat-5.5-doc/connectors.html) says that the HTTP connecter is setup by default.  
Does this mean that I don't need to configure anything on the Tomcat side of things?
 
Any help on getting this up and running would be much appreciated.
Thanks.

0
Comment
Question by:grapeorillo
4 Comments
 

Author Comment

by:grapeorillo
ID: 18043055
OK.  I've got part of it working   I've created a working.properties folder like so:

workers.tomcat_home="c:/Program Files/Apache Software Foundation/Tomcat 5.5"
workers.java_home="C:/Program Files/Java/jre1.5.0_09"
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1

and

I've modified the http.conf like so:
      JKWorkersFile "conf/workers.properties"
      JKLogFile "logs/mod_jk.log"
      JKLogLevel error
      JKMount /jsp-examples default
      JKMount /jsp-examples/* default
      JKMOUNT /*.jsp default

the jsp-examples is there just so I had some JSP code to test.   I'm a little confused about how JKMount directs things and why the /*.jsp doesn't seem to function how I thought it would.  When I go to \\127.0.0.1 I get the default apache page in htdocs like I'd expect.  But when I put some sample jsp in the htdocs tomcat gives me a 404.  When I put the same code in the /jsp-examples directory it functions fine.  Can anyone tell me why this might be?    Also, how do I point everything to a different directory entirely, making certain that the static pages are dealt with by apache and the jsp by tomcat?

Thanks.
0
 
LVL 12

Accepted Solution

by:
Gibu George earned 500 total points
ID: 18044524
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 18046868
Hi,
Everything I have read says that mod_jk will not work with 2.2.  What little information is available says use the proxy modules.
You should specify these modules to be built during the building of Apache and then load them:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Then, there are about a zillion ways to proxy and next to NO documentation on actually using them.  I found this simple approach works, as long as you are asking nothing more than shooting every request through to Tomcat:

<Location / >
   ProxyPass ajp://localhost:8009/
</Location>

i hope this may help you...

R.K
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 18064406
I answered once this question. See solution at http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_22066748.html
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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