I have a problem with tomcat - apache and I was hoping anyone could help me.

I have an apache server with ssl installed on the machine. On another
machine I have tomcat installed. Now I need to have the apache server
forward all *.jsp request to the tomcat machine so that tomcat can do it´s
job and then return the result to the apache server. I am using ajp13 to
forward the request to tomcat. I have configured my servers according to the
steps below but it doesn´t work properly. Sometimes the match doesnt add up
at all and the wrong file is returned and most of the time the session is
dropped for some reason. If I do request.getSession(true) then
session.isNew() is always true.
Anyone knows what to do?

//  Joakim Hellstrom



>Required packages and where to get them
>=======================================
>
>apache_1.3.12.tar.gz
>  http://www.apache.org/dist/apache_1.3.12.tar.gz
>
>mod_ssl-2.6.5-1.3.12.tar.gz
>  http://www.modssl.org/source/mod_ssl-2.6.5-1.3.12.tar.gz
>
>openssl-0.9.5a.tar.gz
>  http://www.openssl.org/source/openssl-0.9.5a.tar.gz
>
>mm-1.1.3.tar.gz
>  http://www.engelschall.com/sw/mm/mm-1.1.3.tar.gz
>
>jakarta-tomcat-3.2.tar.gz
> 
>http://jakarta.apache.org/builds/tomcat/release/v3.2/bin/jakarta-tomcat-3.2
.
>tar.gz
>
>jakarta-tomcat-3.2-src.tar.gz
> 
>http://jakarta.apache.org/builds/tomcat/release/v3.2/src/jakarta-tomcat-3.2
-
>src.tar.gz
>
>
>1) Copy and extract all the required packages
>=============================================
>
># cd /usr/local
># tar xzvf apache_1.3.12.tar.gz
># tar xzvf mod_ssl-2.6.5-1.3.12.tar.gz
># tar xzvf openssl-0.9.5a.tar.gz
># tar xzvf mm-1.1.3.tar.gz
># tar xzvf jakarta-tomcat-3.2.tar.gz
># tar xzvf jakarta-tomcat-3.2-src.tar.gz
>
>
>2) openssl-0.9.5a
>=================
>
># cd /usr/local/openssl-0.9.5a
># ./config no-idea
># make
>
>
>3) mm-1.1.3
>===========
>
># cd /usr/local/mm-1.1.3
># ./configure --disable-shared
># make
>
>
>4) mod_ssl-2.6.5-1.3.12
>=======================
>
># cd /usr/local/mod_ssl-2.6.5-1.3.12
># ./configure --with-apache=../apache_1.3.12 --with-ssl=../openssl-0.9.5a
>--with-mm=../mm-1.1.3 --prefix=/usr/local/apache
>
>
>5) apache_1.3.12
>================
>
># cd /usr/local/apache_1.3.12
># ./configure --prefix=/usr/local/apache --enable-module=so
>--enable-rule=SHARED_CORE --enable-module=most --enable-shared=max
>--enable-module=ssl --enable-shared=ssl
># make
># make certificate
># make install
>
>
>6) jakarta-tomcat-3.2-src
>=========================
>
>To build mod_jk you need to do the following:
># cd /usr/local/jakarta-tomcat-3.2-src/src/native/apache1.3
>Edit Makefile.linux, set APXS to point to a correct apxs script:
>APXS=/usr/local/apache/bin/apxs
># make -f Makefile.linux
># cp mod_jk.so /usr/local/apache/libexec
>
>
>7) Configure jakarta-tomcat-3.2
>===============================
>
># export TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2
># cd $TOMCAT_HOME
>
>7.1 Edit conf/worker.properties file:
>
>Set workers.tomcat_home to point to a correct directory:
>workers.tomcat_home=/usr/local/jakarta-tomcat-3.2
>
>Set workers.java_home to point to a correct directory:
>workers.java_home=/usr/java/jdk1.3
>
>Set environment slash:
>ps=/
>
>
>7.2 Edit conf/server.xml file:
>Add following lines (somewhere around ~line 262):
>
><!-- Apache AJP13 support. This is also used to shut down tomcat.  -->
><Connector className="org.apache.tomcat.service.PoolTcpConnector">
>   <Parameter name="handler"
>value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
><   Parameter name="port" value="8009"/>
></Connector>
>
>7.3 Start Tomcat
>
># cd $TOMCAT_HOME/bin
># ./startup.sh
>
>
>8) Configure apache_1.3.12
>==========================
>
># cd /usr/local/apache
>
>8.1 Edit conf/httpd.conf file:
>
>Add following line at the end of LoadModule list (somewhere around ~line
>238):
>LoadModule jk_module          libexec/mod_jk.so
>
>Add following line at the end of AddModule list (somewhere around ~line
>280):
>AddModule mod_jk.c
>
>Add following lines at the end of configuration file:
>
><IfModule mod_jk.c>
>  JkWorkersFile /usr/local/jakarta-tomcat-3.2/conf/workers.properties
>  JkLogFile  logs/jk.log
>  JkLogLevel warn
>  JkMount /*.jsp ajp13
>  JkMount /servlet/* ajp13
>  JkMount /examples/* ajp13
></IfModule>
>
>8.2 Start Apache
>
>Shutdown any existing httpd daemons before starting new server (ps -ef |
>grep httpd).
># cd /usr/local/apache
># ./bin/apachectl startssl
>Or without ssl
># ./bin/apachectl start
>
>
>9) Test
>=======
>
>Start browser and type URL
>http://hostname
>and
>https://hostname
>In the second step, browser should show and ask you to accept hosts dummy
>certificate.
>
>Next try Tomcat integration and type URL
>https://hostname/examples/jsp/index.html
>and select, for example, number guess JSP example.
>
>
>10) Notes
>=========
>
>- Start Tomcat first. If there is a need to restart Tomcat, you have to
>restart Apache too.
>
>
>--
>--------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>List Help?:          [EMAIL PROTECTED]
>
>

--


Rolando Rivera 
CYMSoft Enterprise Architect




--


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to