tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Hoare <jho...@ihug.com.au>
Subject Re: new thread for Jeffrey Caswell
Date Fri, 10 May 2002 00:40:43 GMT
Hi,
mod_jk and mod_webapp are 2 different connectors. So you shouldn't have any 
directives for mod_webapp unless you are using this connector.
I followed the instructions that Gianluca provided (adopted for linux) and 
they work for me. I've added some comments to the instructions below in case 
they help. They appear as 
JEFF--->

The other thing is that Tim provided a link to instructions for setting up the 
particular combination you have which looked ok. Have you tried thes?


>
> Let's start ...
>
> 1 :: Check that U have
>
> {apache2Path}/libexec/mod_jk.dll
>
> If not, download a precompiled version, it works for me ...
>
> 2 :: Check for these lines in your server.xml for Tomcat (I found them
> after installation, I didn't need to modify anything in server.xml)
>
>
> ***** SERVER:XML *****
> ...
> ...
>   <Service name="Tomcat-Apache">
>
>     <Connector
> className="org.apache.catalina.connector.warp.WarpConnector"
>      port="8008" minProcessors="5" maxProcessors="75"
>      enableLookups="true" appBase="webapps"
>      acceptCount="10" debug="0"/>
>
>     <!-- Replace "localhost" with what your Apache "ServerName" is set
> to -->
>     <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>      name="Apache" debug="0">
>
>       <!-- Global logger unless overridden at lower levels -->
>       <Logger className="org.apache.catalina.logger.FileLogger"
>               prefix="apache_log." suffix=".txt"
>               timestamp="true"/>
>
>       <!-- Because this Realm is here, an instance will be shared
> globally -->
>       <Realm className="org.apache.catalina.realm.MemoryRealm" />
>
>     </Engine>
>
>   </Service>
JEFF ---> This relates to the webapp connector, so if you are using mod_jk 
this is not relevant its just in the server.xml file by default. You will 
also need to ensure that you have a connector listening on port 8009, which 
is the port specified for mod_jk. If you check the server.xml file you will 
find a connector listening on port 8009 (just look for this in the file) 
check that its not commented out (shouldn't be by default).
Here is the fragment...
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>
> ************************
>
> 3 :: Now U have to modify some lines in httpd.conf:
>
> ****** HTTPD.CONF ******
> ...
> ...
> {at the end of the file: )
>
> LoadModule jk_module libexec/mod_jk.dll
> Include "{tomcat folder}/conf/auto/mod_jk.conf
> JkWorkersFile "{tomcat folder}/conf/workers.properties"   // U'll write
> down this file later
> JkLogFile     "{apache2 folder}/logs/mod_jk.log"
> JkLogLevel    info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>
> *************************
JEFF---> change libexec to where ever you modules are located. I just look to 
see where other modules have been placed and copy the mod_jk library to this 
location. Of couse you need to replace {tomcat folder} with the location of 
your tomcat installation.
>
> 4 :: Now open your editor and create a file like this in {tomcat
> folder}/conf/workers.properties:
>
> ****** {tomcat folder}/conf/workers.properties ******
>
> worker.list=ajp13
>
> worker.ajp13.port=8009
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp13
>
> ******************************************************
JEFF --> replace {tomcat folder} with the location of your tomcat install
>
> !!!!!
>
> It's enough, next time U start apache, then Tomcat, U have to find
> something like this in your httpd.conf:
>
> <VirtualHost *>
>     ServerName grava.d2g.com
>
>     JkMount /manager ajp13
>     JkMount /manager/* ajp13
>
>     JkMount /examples ajp13
>     JkMount /examples/* ajp13
>
>     JkMount /tomcat-docs ajp13
>     JkMount /tomcat-docs/* ajp13
>
>     JkMount /webdav ajp13
>     JkMount /webdav/* ajp13
>
>     jkMount /docs ajp13
>     jkMount /docs/* ajp13
>
> </VirtualHost>
>
> Depending on the context in your server.xml, with this I have a problem
> cos everytime I start Tomcat it opens
> {tomcat-folder}/conf/auto/mod_jk.conf for appending instead of rewriting
> it, so Apache find duplicate virtual hosts. I cooment this line:
>
> # Include "{tomcat folder}/conf/auto/mod_jk.conf
>
> In httpd.conf and when I deploy something I have to add it in httpd.conf
> too, like:
>
>     jkMount /myapps ajp13
>     jkMount /myapps/* ajp13
>
> In virtualHost directive in httpd.conf. Where myapps is the new context
> deployed with tomcat.
>
> After this I'm able to access my jsps and my servlets with
>
> http://myhost:8080/myapps
>
> http://myhost:80/myapps (managed by apache).
>
> It works for me, hope te be of some help for U.
>
> For advanced tuning I did nothing... I just make it works a couple of
> day ago, now I haver to study for an exam :-((((
>
> Good Luck and let me know!
>
> Gianluca
>
JEFF --> test the Apache config. On linux this is http -t. If you get Syntax 
ok then start tomcat, once this is up then start apache.

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


Mime
View raw message