tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Connecting the HTTP Server and Tomcat
Date Thu, 08 Apr 2004 13:30:51 GMT
Hi.

I realize you're looking at jsvc right now and thinking about removing 
the Apache component altogether, but I'll take a shot at this anyway.

AddModule appears to have been dropped in Apache 2.0.xx, so just leave 
it out.  I didn't use it in my environment and things are working. 

Here's most likely to be an issue:  Did you name your worker in 
workers.properties 'ajp13'?  You should probably change your JkMount to 
read:

JkMount    /portal/*  ajp13worker  # or whatever you named the ajp13 worker

If you did name your worker 'ajp13', I would at least change the name to 
something else just to remove confusion.

This may or may not affect you, but I'll throw it out there in case some 
reading this finds it useful.  In my config, I was setting things up for 
a virtual host environtment and things only worked when JkWorkersFile, 
JkLogFile, and JkLogLevel stayed out of my <VirtualHost> block.  Only 
JkMount was included in the <VirualHost> block.  I'm not sure whether 
that's normal or not, but it's my experience.

--David

Wilson, Allen wrote:

>No a problem...I am using 2.0.48..
>
>I have the LoadModule line and the other directives here...they are 
>
>
>LoadModule jk_module /usr/WWW/libexec/mod_jk.so
>
>
> JkWorkersFile /usr/tomcat-4.1.18/conf/jk/workers.properties
> JkLogFile     /usr/tomcat-4.1.18/logs/mod_jk.log
> JkLogLevel    debug
> JkMount      /portal/* ajp13
>
>I was unable to put in the AddModule line because I did not see it (the
>mod_jk.c file) loaded when I did the apachectl -l. I am working on
>getting that loaded now
>
>-----Original Message-----
>From: David Smith [mailto:dns4@cornell.edu] 
>Sent: Wednesday, April 07, 2004 3: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:jon.wingfield@mkodo.com] 
>>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:jon.wingfield@mkodo.com] 
>>>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.htm
>>>>        
>>>>
>l
>  
>
>>>>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:bbruns@fitme.com] 
>>>>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:Allen.Wilson@marcresearch.com]
>>>>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:emerson@tre-sc.gov.br]
>>>>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:emerson@tre-sc.gov.br]
>>>>>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:kwilding@essex.ac.uk]
>>>>>>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: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>> 
>>
>>-----------------------------------------------------------------------
>>    
>>
>-
>  
>
>>This message may contain proprietary or confidential company
>>    
>>
>information.
>  
>
>>Any unauthorized use or disclosure is prohibited.
>>
>>
>> 
>>
>>-----------------------------------------------------------------------
>>    
>>
>-
>  
>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>
>------------------------------------------------------------------------
>
>This message may contain proprietary or confidential company information.
>Any unauthorized use or disclosure is prohibited.
>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message