<apache-home>/conf/httpd.conf -------------------------------------------------------------------- LoadModule jk_module modules/mod_jk.so
JkWorkersFile /usr/tomcat/conf/jk/workers.properties JkLogFile /usr/apache/log/mod_jk.log JkLogLevel Warn
<VirtualHost *>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/tomcat/webapps
ServerName server.you.com
CustomLog "|/code/utils/cronolog/cronolog /home/apache/log/%Y_%m_%d_default_access_log" combined
JkMount /*.do tomcat
JkMount /*.jsp tomcat
JkMount /servlet/* tomcat
</VirtualHost>
--------------------------------------------------------------------
<tomcat-home>/conf/jk/workers.properties -------------------------------------------------------------------- workers.tomcat_home=/code/jboss/tomcat-4.1.x workers.java_home=/code/java/j2sdkse ps=/ worker.list=tomcat
# Definition for Ajp13 worker worker.tomcat.port=12541 worker.tomcat.host=localhost worker.tomcat.type=ajp13 --------------------------------------------------------------------
<tomcat-home/conf/server.xml -------------------------------------------------------------------- <Service name="Tomcat-Apache"> <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" port="12541" minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/> <Engine className="org.apache.catalina.connector.warp.WarpEngine" name="Apache" debug="0" defaultHost="localhost"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="apache_log." suffix=".txt" timestamp="true" verbosity="1"/> <Realm className="org.apache.catalina.realm.MemoryRealm" /> <Host name="localhost" appBase="webapps" autoDeploy="true" unpackWARs="true" deployXML="true" liveDeploy="true"> <DefaultContext path="" docBase="ROOT" debug="0" reloadable="true" swallowOutput="true"> </DefaultContext> </Host> </Engine> </Service> --------------------------------------------------------------------
Can't get much easier to follow than that I think. Place the mod_jk lines anywhere in the httpd.conf file. Add the workers.properties file to the jk directory under <tomcat-home>/conf/. And use this connector in Tomcat <Connector className="org.apache.ajp.tomcat4.Ajp13Connector">.
The httpd.conf properties sends requests for .jsp, .do, and /servlet/ to tomcat but everything else is run by Apache. And, since you point the DocumentRoot to "/usr/tomcat/webapps", Apache uses the Tomcat webapps directory as its home. So any .html, .gif, etc. get served right out of Tomcat.
Hope this all makes sense.
Charlie
Swen Schillig wrote:
Hi *
I'm new to tomcat but I'm still trying to get this running under Apache.
Ok, tomcat standalone is running perfect with http://localhost:8080 without having me changing any file anywhere.
After that I tried to get it running from within Apache.
For that I learned, I need "mod_jk2.so" which I compiled and installed successfully
(I used --with-apxs2 / --with-tomcat41 / --with-jni to configure)
- the modules (mod_jk2, jkjni.so) are copied into /usr/local/apache2/modules.
- the httpd.conf is modified accordingly
LoadModule jk2_module modules/mod_jk2.so
JkSet config.file /usr/local/apache2/conf/workers2.properties
So far so good, I can see from the web-server logs and the web-server environment that everything was successful.
But for some reason I can't get anything running from here (jsp, servlet).
Of course I read almost everything from the jakarta.apache.org page but unfortunately
each description is missing something. I couldn't find any straight forward HOWTO which works for the standard installation !
All the examples will lead to an error !!!
Does someone have a set of the following files jk2.properties workers2.properties server.xml web.xml which I can just copy to my system to get at least some output !! Anything but an error would be highly appreciated !! If there's any change needed to httpd.conf please post this as well !!
Thanks in advance !
Mit freundlichen Gr��en / Best Regards
Swen Schillig
IBM Germany, Mainz - AIS Storage Subsystems - 0A156
Phone
Internal : *122-2805
External : +49(0)6131-84-2805
Mobile : +49(0)172-7344938
Fax
Internal : 921-6708
External : +49(0)6131-84-6708
e-mail : [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
