Web - Apache and Tomcat Integration

From fmepedia


Use http://fmepedia.com/index.php/Web_-_Apache_Tomcat_Connector instead


Tested on Windows XP Professional SP2, Apache 2.2.8, Tomcat 6.0.18 and FME Server build 6325.

Table of contents

Prerequisites

JDK/JRE installed

Apache installed

Tomcat installed

1. You may want to set the service Startup Type as Automatic since FME Server has to run on it.
Image:set_service_startup_type.JPG
2. Make a note for port number if it is changed from default 8080 to others. You will need this port number during the FME Server installation progress.

Apache Tomcat Connector

Link to connector (http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/). Only version mod_jk-1.2.26-httpd-2.2.4.so is tested.

Steps to integrate Apache and Tomcat

1. Copy the downloaded connector mod_jk-<version>.so into <Apache Installed Dir>\modules, and rename it to mod_jk.so
2. Open a text editor (for example, notepad in windows, vi or gedit in Linux).
3. Copy the following lines into the text editor, and save the file as mod_jk.conf

 <IfModule !mod_jk.c>
    LoadModule jk_module modules/mod_jk.so
</IfModule> <VirtualHost *>
    ServerName localhost
    JkLogFile "logs/mod_jk.log"
    JkLogLevel error
    # This block is for Tomcat 6. If you are working on Tomcat 5.5, try /jsp-examples and servlets-examples
    JkMount /examples ajp13
    JkMount /examples/* ajp13
    JkMount /webdav ajp13
    JkMount /webdav/* ajp13
    JkMount /balancer ajp13
    JkMount /balancer/* ajp13
    JkMount /tomcat-docs ajp13
    JkMount /tomcat-docs/* ajp13
    JkMount /manager ajp13
    JkMount /manager/* ajp13
    JkMount /fme* ajp13
    JkMount /fme*/* ajp13
    # The following line will exclude /fmedatadownloadresults/* when the Apache serves datadownload service result datasets     # Please remove this line if the Tomcat serves datadownload service result datasets
    SetEnvIf Request_URI "/fmedatadownloadresults/*" no-jk      </VirtualHost>

4. Copy the created file mod_jk.conf into folder <Apache installed Dir>\conf\
. Note: In FME 2010 there is an additional servlet called fmedataupload. 5. In a text editor, open configuration file httpd.conf in the folder <Apache installed Dir>\conf\
6. Copy the following lines into the end of httpd.conf and save the file

   # Configure mod_jk integration with Tomcat
    Include conf/mod_jk.conf

7. Stop Apache.
8. Restart Tomcat.
9. Now, it's ready to install FME Server

Debugging

1. Web Server works?
Try this URL in a browser http://localhost or http://<hostName>
There should be a page displays "It works" if the web server works properly
2. Tomcat works?
Try this URL in a browser http://localhost:<portNumber> or http://<hostName>:<portNumber>. The default port number is 8080
There should be a home page if the Tomcat servlet engine works properly
3. The integration works?
Note: Make sure you installed examples before proceeding
Try this URL in a browser http://localhost/examples or http://<hostName>/examples.
If you are working on Tomcat 5.5, the URL will be http://localhost/jsp-examples or http://<hostName>/servlets-examples

Good Luck.

Attached Files
filesizedate
index.php------
printthread.php------
white------
xmlrpc.php------
User Comments Add a new comment