Solved

Connecting Tomcat 5.5 and Apache 2.2

Posted on 2006-11-29
4
1,562 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macrodef Questions 2 121
removing tomcat 6 completely. 1 1,206
java.lang.OutOfMemoryError:MetaSpaceError in tomcat 7 109
PHP Curl Setup Option 4 56
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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

22 Experts available now in Live!

Get 1:1 Help Now