Allen, thanks for pointing me at mod_jk.  It works better than proxy or
rewrite!
I've implemented it here now on Apache 2.0 (under WinXP) connected to Tomcat
4.1.24 (Solaris).
with mod_jk 1.2.5.  Works great!  In case it helps, I'll attach my config
files:

Tomcat's server.xml:
---------------------
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8113" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="20"/>

workers.properties:
-------------------
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=192.168.1.62
worker.worker1.port=8113
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

Apache httpd.conf:
------------------
#########################################
# Entries for connection to Tomcat
# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module modules/mod_jk.dll
# Declare the module for <IfModule directive>
#AddModule mod_jk2.c
# Where to find workers.properties
# Update this path to match your conf directory location (put
workers.properties next to httpd.conf)
JkWorkersFile "C:\Program Files\Apache
Group\Apache2\conf\workers.properties"
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log
next to access_log)
#JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
#JkLogLevel info
# Select the log format
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
#JkRequestLogFormat "%w %V %T"
# Send everything for context /examples to worker named worker1 (ajp13)
JkMount /fitmesite/* worker1
jkMount /soap/* worker1
#
# end of Tomcat connection info
########################################################################


-----Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 1:19 PM
To: Tomcat Users List
Subject: Re: Connecting the HTTP Server and Tomcat


Hi.

Can you post the relevant parts of your httpd.conf file?  Also, I missed
this in the thread if it was mentioned, but what version of Apache are
you working with?  I ask, because it looks like from my setup that
Apache ditched the AddModule directive in Apache 2.0.xx.

LoadModule needs to be in your httpd.conf file before the AddModule
directive under Apache 1.3.x as in:

# All the other LoadModule directive here.....
LoadModule jk_module  modules/mod_jk.so

# Further down, all the AddModule directives here....
AddModule mod_jk.c

It'd be helpful to see the JkWorkersFile directive, JkMount directive,
and the contents of the jk workers file.

--David

Just tack it on to the end of the list of LoadModule directives.  Then
use AddModule at the end of the list of AddModule directives.

Wilson, Allen wrote:

>I think I may have found the problem....
>
>I tried to add the line AddModule mod_jk.c in the HTTP server config and
>it gave an error. I could not locate the file within my HTTP or Tomcat
>installation.....even though I have the mod_jk.so file in the libexec
>directory.
>
>
>
>-----Original Message-----
>From: Jon Wingfield [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, April 07, 2004 2:35 PM
>To: Tomcat Users List
>Subject: Re: Connecting the HTTP Server and Tomcat
>
>
>Assuming the connector is working, what effect does adding an additional
>
>mapping of
>
>/portal        ajp13
>
>to your existing
>
>/portal/*      ajp13
>
>mapping have?
>
>I just double-checked on our dev box where jk is definitely up. I got a
>404 from apache for /<mapping> but /<mapping>/stuff got routed through
>to tomcat.
>
>Jon
>
>Wilson, Allen wrote:
>
>
>
>>No you are not way off...at least not from my point of view because
>>
>>
>that
>
>
>>is what I thought would work. But unless I specify the port
>>(http://myserver.com:8080/portal) it will not get there...
>>
>>It makes me think that the connector is not function correctly but I
>>
>>
>do
>
>
>>not know how to tell..when I check the running ports I see the 8009
>>
>>
>port
>
>
>>running but it does not hand to Tomcat
>>
>>-----Original Message-----
>>From: Jon Wingfield [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, April 07, 2004 2:09 PM
>>To: Tomcat Users List
>>Subject: Re: Connecting the HTTP Server and Tomcat
>>
>>
>>I may be way off but...
>>I don't think
>>http://myserver.com/portal
>>maps to
>>/portal/* ajp13
>>
>>http://myserver.com/portal/
>>or
>>http://myserver.com/portal/whatever.jsp
>>probably will, though.
>>
>>Give it a go, may work,
>>
>>Jon
>>
>>Wilson, Allen wrote:
>>
>>
>>
>>
>>>Bill..thanks for the reply...
>>>
>>>I will read through the link you provide but isn't that what the
>>>connector is supposed to do.
>>>
>>>My understanding what that the Apache HTTP server would detect what
>>>
>>>
>>the
>>
>>
>>
>>>request was (Java or not) and pass it on to Tomcat.
>>>Is this not what the specification of /portal/* ajp13 in the
>>>configuration does.
>>>
>>>This is what I got from the document at:
>>>
>>>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk.quickhowto.html
>>>
>>>Here is a little from one of the pages in that area... (
>>>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html )
>>>
>>>In a nutshell a web server is waiting for client HTTP requests. When
>>>these requests arrive the server does whatever is needed to serve the
>>>requests by providing the necessary content.
>>>
>>>Adding a servlet container may somewhat change this behavior. Now the
>>>web server needs also to perform the following:
>>>
>>>Load the servlet container adapter library and initialize it (prior to
>>>serving requests).
>>>When a request arrives, it needs to check and see if a certain request
>>>belongs to a servlet, if so it needs to let the adapter take the
>>>
>>>
>>request
>>
>>
>>
>>>and handle it.
>>>The adapter on the other hand needs to know what requests it is going
>>>
>>>
>>to
>>
>>
>>
>>>serve, usually based on some pattern in the request URL, and to where
>>>
>>>
>>to
>>
>>
>>
>>>direct these requests.
>>>
>>>
>>>Is this not correct...or am I misunderstanding it
>>>
>>>
>>>
>>>-----Original Message-----
>>>From: Bill Bruns [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, April 07, 2004 12:26 PM
>>>To: Tomcat Users List
>>>Subject: RE: Connecting the HTTP Server and Tomcat
>>>
>>>
>>>Allen,
>>>
>>>do you have the web server configured to throw the requests over to
>>>Tomcat?
>>>In other words, have either Proxy support or else URL Rewriting turned
>>>on in
>>>the web server?
>>>Otherwise your HTTP requests default to port 80, so they will be eaten
>>>by
>>>the web server and never reach Tomcat,
>>>since Tomcat is listening on ports that the HTTP requests do not come
>>>
>>>
>>to
>>
>>
>>
>>>by
>>>default.
>>>
>>>Have you looked at
>>>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/proxy-howto.html
>>>- Bill
>>>
>>>-----Original Message-----
>>>From: Wilson, Allen [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, April 07, 2004 8:54 AM
>>>To: Tomcat Users List
>>>Subject: RE: Connecting the HTTP Server and Tomcat
>>>
>>>
>>>Okay...that looks similar to the tomcat 4 information I have....is
>>>
>>>
>>your
>>
>>
>>
>>>connector working correctly?
>>>
>>>-----Original Message-----
>>>From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
>>>Sent: Tuesday, April 06, 2004 6:06 PM
>>>To: Tomcat Users List
>>>Subject: Re: Connecting the HTTP Server and Tomcat
>>>
>>>
>>>My configuration is for tomcat 5:
>>>
>>><Service name="Catalina">
>>>    <Connector acceptCount="100" connectionTimeout="20000"
>>>disableUploadTimeout="true" port="8080" redirectPort="8443">
>>>    </Connector>
>>>
>>>    <Connector port="8009"
>>>               enableLookups="false" redirectPort="8443" debug="0"
>>>               protocol="AJP/1.3" />
>>>
>>>    <Engine defaultHost="localhost" name="Catalina">
>>>      <Host appBase="webapps" name="localhost">
>>>        <Logger className="org.apache.catalina.logger.FileLogger"
>>>prefix="localhost_log." suffix=".txt" timestamp="true"/>
>>>...
>>>...
>>>
>>>Wilson, Allen wrote:
>>>
>>>
>>>
>>>
>>>>Here are the lines.....
>>>>
>>>>              <Connector
>>>>className="org.apache.catalina.connector.http.HttpConnector"
>>>>                     port="8080" minProcessors="5"
>>>>
>>>>
>>>maxProcessors="75"
>>>
>>>
>>>
>>>
>>>>                     enableLookups="true" redirectPort="8443"
>>>>                     acceptCount="100" debug="0"
>>>>connectionTimeout="20000" />
>>>>
>>>>              <!-- Define an AJP 1.3 Connector on port 8009 -->
>>>>              <Connector
>>>>className="org.apache.ajp.tomcat4.Ajp13Connector" port="8009"
>>>>minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/>
>>>>
>>>>Let me know if there is something that is incorrect.....
>>>>
>>>>-----Original Message-----
>>>>From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
>>>>Sent: Tuesday, April 06, 2004 4:28 PM
>>>>To: Tomcat Users List
>>>>Subject: Re: Connecting the HTTP Server and Tomcat
>>>>
>>>>
>>>>You said you can connect through port 8009 through the browser???
>>>>The jk protocol is not http, so if the configuration was allright you
>>>>can't connect through 8009 as http. Maybe the error is at your
>>>>server.xml...
>>>>
>>>>Wilson, Allen wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Thanks but this is on a Windows system and will not help...I am on a
>>>>>Solaris and I have looked at documents like this before and they
>>>>>
>>>>>
>>still
>>
>>
>>
>>>>>do not give me a definitive way of setting everything and testing
>>>>>
>>>>>
>>>>it...
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Right now I have the HTTP server (port 80), Tomcat (port 8080), and
>>>>>
>>>>>
>>>>the
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>connector (8009) running. I even looked at the netstat to see if
>>>>>
>>>>>
>each
>
>
>>>>>port was available...and they were.
>>>>>
>>>>>When a do the home page request (http://myserver.com) it works
>>>>>fine...but if I request the page for the Jetspeed Portal
>>>>>(http://myserver.com/portal), I get an error. If I request the
>>>>>
>>>>>
>portal
>
>
>>>>>page through port 8080 it works fine. If I request the same page on
>>>>>
>>>>>
>>>>8009
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>it works fine.
>>>>>
>>>>>In all cases there were no entries in my mod_jk.log.
>>>>>
>>>>>I am looking for something that will outline the steps for me on a
>>>>>Solaris machine or at least give me a better way to diagnose what I
>>>>>
>>>>>
>>am
>>
>>
>>
>>>>>doing wrong....
>>>>>
>>>>>
>>>>>
>>>>>-----Original Message-----
>>>>>From: kwilding [mailto:[EMAIL PROTECTED]
>>>>>Sent: Tuesday, April 06, 2004 10:55 AM
>>>>>To: 'Tomcat Users List'
>>>>>Subject: RE: Connecting the HTTP Server and Tomcat
>>>>>
>>>>>
>>>>>http://www.greenfieldresearch.ca/technical/jk2_config.html
>>>>>
>>>>>This was a really good starting point. Ignore the fact it talks abut
>>>>>windows, I imstaled on SuSE8.2 using apache2.0.48 and both tomcat 4
>>>>>
>>>>>
>>>>and
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>5
>>>>>Kevan
>>>>>
>>>>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>------------------------------------------------------------------------
>
>This message may contain proprietary or confidential company information.
>Any unauthorized use or disclosure is prohibited.
>
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to