Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

mod_jk tomcat 4.1 with apache 1.3.27 on Redhat 7.2 box

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I both Apache and Tomcat running as expected when I each of them separately, however I have some problems when I try to connect them.
The mod_jk is loaded correctly (as stated in the apache logs) but Apache insists of not talking to the tomcat app.
There are virtual hosts configure in the apache (which works fine with Resin btw)
I have the following lines in my httpd.conf
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /tomcat/conf/workers.properties
JkLogFile /apache/log/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

In addition I have the following added to each virtual host which I like to connect to Tomcat
<IfModule mod_jk.c>
JkMount /<Path to host root dir>/* worker1
</IfModule>
I edit the /tomcat/conf/workers.properties file to point to the correspond host but still the jsp test file doesn't render correctly.
can anyone point to me what am I doing wrong ??
thanks in advance
/Shraga.
 
Saloon Keeper
Posts: 24551
168
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First off, you haven't defined "worker1". Most of the examples I've seen actually call this "ajp13" and define it in the workers.properties, but you didn't list the workers.properties, so we don't know if you did that right.
A typical workers.properties (using worker name "ajp13" looks like this:
pa=\
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
You didn't mention configuration of the Connector that will be listening on tcp/ip port 8009. If you don't set that up then tomcat can't hear the requests that Apache wants to forward to it.
 
Shraga van Shufel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Sorry I didn't include the settings from the worker.properties file.
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=<my virtual host>
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300
thanks in advance for your help
/Shraga.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic