Connecting Apache 3 to Tomcat 3a (Using jserv Web Server Connector) tomcat conf file



Download 15.27 Kb.
Date29.07.2017
Size15.27 Kb.
#24216

Connecting Apache 1.3 to Tomcat 3.3a

(Using JServ Web Server Connector)



tomcat.conf file

When Tomcat starts up it will automatically generate a configuration file for Apache in $TOMCAT_HOME/conf/jserv/tomcat.conf. Since we needed to change the ajp12 port from 8007 to 8027, this file should only be used as a base. If you change this file, it will get overwritten every time Tomcat starts.


Simply copy this file to a different filename (i.e. tomcat_dbaprod.conf).
Now edit the tomcat_dbaprod.conf file and make the following changes:


Add the following:

ApJServProperties /u02/app/tomcat/conf/jserv/tomcat_dbaprod.properties



Change the following port from 8007:

ApJServDefaultPort 8027



Add the following:

httpd.conf AddModule mod_jserv.c





httpd.conf file

Now edit the httpd.conf file from Apache to “include” the tomcat_dbaprod.conf file.




include "/u02/app/tomcat/conf/jserv/tomcat_dbaprod.conf"





Obtaining the Jserv module (mod_jserv)

We now need a web server adapter to sit in Apache and redirect requests to Tomcat. For Apache, this adapter is a slightly modified version of mod_jserv. Although you may be able to find a pre-built version of mod_jserv, the DBA Group will build a fresh version from the Tomcat source code.


Building mod_jserv on UNIX involves the following:


  1. Download the source distribution of Tomcat from MetaView: dbaprod:/u01/app/oracle/web/data/Software/Tomcat/3.3a. The file is: jakarta-tomcat-3.3a-src.tar.gz.

  2. Uncompress / untar it into a temporary directory


NOTE: On Solaris you will need to use the gnu version of tar. On dbaprod.comanage.net, I made a version of gnu tar called:

/usr/local/bin/gnu-tar.




  1. Building the module:

    • Change directory into jakarta-tomcat/src/native/jserv

    • If your version of Perl is not in /bin/perl, you will need to edit the apxs script to include the correct path to your perl binary.

    • Execute the build command

/u02/app/apache/bin/apxs -c -o mod_jserv.so *.c

apxs is part of the Apache distribution and should be located in your APACHE_HOME/bin.



Copy mod_jserv module to Apache

From the directory you compiled the mod_jserv.so library (above), simply copy the library module to the libexec directory of Apache:


% copy mod_jserv.so to /u02/app/apache/libexec
Once you copy the library module to the Apache libexec directory, you can remove the temporary Tomcat source code directory tree.

Test the Apache / Tomcat Configuration



First: startup Tomcat:
% $TOMCAT_HOME/bin/startup.sh
Second: startup Apache:
% $APACHE_HOME/bin/apachectl start
Testing:
Point your browser to the index page for the Apache server and verify that you get the default Apache page (unless you replaced it already with your own, of course).
Point your browser to the index page for the Tomcat server and verify that you get the default Tomcat page (unless you replaced it already with your own, of course).
Now point your browser to a URL like the following:
http://dbaprod.comanage.net/examples/servlet/HelloWorldExample
If everything works right, this request will be forwarded to Tomcat for processing and you should see the results.
Problems:
If the step above does not work, point directly to Tomcat (by changing the port in the URL) and try again. If you still have problems, then Tomcat is not processing the servlet file correctly and you need to go back through $TOMCAT_HOME/conf/server.xml and see why. You might also need to verify that the startup script, $TOMCAT_HOME/bin/tomcat.sh, is picking up the tools.jar JDK library.
Directory: data -> Programming -> web -> connecting apache tomcat
data -> Jaeyong song
data -> By Fel (aka James Galloway) Table of Contents Chapter 1
data -> Vitaly Goldshteyn
data -> Hurricane Katrina, a climatological Perspective October 2005, Updated August 2006 Introduction
data -> 1997 Atlantic Tropical Storms
data -> Introduction
data -> The Impact of Saharan dust aerosols on tropical cyclones using wrf-chem: Model framework and satellite data constraint technique
data -> Earth-Atmosphere Interactions: Tropical Storm and Hurricane Activity in the Caribbean and Consequent Health Impacts
data -> Meeting Of September 16, 2010 today’s meeting
connecting apache tomcat -> Instructions for installing Tomcat as a servlet container for Apache 0 on unix. For example, this will allow Tomcat’s examples, found at

Download 15.27 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page