Tomcat-Konfiguration
Inhalt: (Verbergen)
How to connect TomCat 3.3 with Apache Webserver v.1.3?
Prerequisites: - packages 'apache' and 'apache-develop' must be installed #1: Create mod_jk.conf by starting TomCat with option 'jkconf' $TOMCAT_HOME/bin/startup.sh jkconf #2: Obtain module 'mod_jk.so' for use by apache to get connected to TomCat: As the module is hard to find on the web (at least I gave up after a while because links were dead, pointing to s.th. else ...) I compliled it on my own. The source usually is shipped with TomCat and is located at $TOMCAT_HOME/native/mod_jk/apache1.3 #3: Compile ... Change to the directory $TOMCAT_HOME/native/mod_jk/apache1.3 (as root) and type make -f Makefile.linux all Copy the module to /usr/lib/apache and edit 'mod_jk.conf' : <IfModule !jk_module.c> LoadModule jk_module /usr/lib/apache/mod_jk.so </IfModule> ... Last but not least add the line Include $TOMCAT_HOME/conf/auto/mod_jk.conf to /etc/httpd/httpd.conf #4: (Re-)start Apache !
How to connect TomCat 5 with Apache Webserver v.2
Download Jakarta-Tomcat-connectors to temp directory
cp jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz /usr/local/src tar ?xvzf jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz cd /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/ ./buildconf ./configure -?with-apxs2=/usr/local/apache2/bin/apxs make
Copy mod_jk2.so to /usr/local/apache2/modules or just download a ready compiled version
Copy the file workers2.properties from /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/conf/ To /usr/local/apache2/conf/ Edit workers2.properties [uri:/new/*](name of Neon Web) info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it alias=myVirtualHost:8003'' ---- cd /usr/local/Tomcat5/conf/ Edit file server.xml <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 � <Connector className="org.apache.coyote.tomcat5.CoyoteConnector" port="8009" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="0" useURIValidationHack="false" protcolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" protocol="AJP/1.3" /> ---- cd ../apache2/conf Edit file httpd.conf # Example: LoadModule jk2_module modules/mod_jk2.so:/new/*]/*]