Web - Apache Tomcat Connector

From Fmepedia

fme_server_related_content.png (http://fmepedia.com/index.php/Category:FME_Server)

Note: Before you start, you may want to have a look at an easier way for Apache and Tomcat integration

Tested: FME Server 2009_B5652_5909

Apache Version 2.2

Tomcat 5.5.25

Purpose:

Instructions for Installing FME Server where we have an Apache Webserver and Tomcat TranslationServlet. In this case we want our web links to use the default webserver port (80) but we also want requests to our servlets automatically sent to the servlet engine

Steps:

- Ensure java virtual machine 1.5 (5) or higher is installed

- install Tomcat version 5 or above using a port other than port 80 (in this example we will use port 8080)

- install Apache Version 2 or above

- install FME Server using the following settings:

 Web Server root directory ->  <ApacheDir>\htdocs
 Web Server port -> 80 
 Servlet Engine Port -> 80 (yes, even though the servlet engine is actually listening on port 8080)
 Web Application Directory specify -> <TomCat>\webapps 

- go to the TomCat connectors web page:

http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

This page has sufficient instructions to set-up the connector but the following steps here summarize the key steps.

- download the appropriate connector for your version to Apache. This basically involves downloading the correct binary file, renaming the file to mod_jk.so and copying it into your <Apache>\modules directory (mod_jk.so).

- create a worker by creating a workers.properties file here:

<Apache>\conf\workers.properties

The contents of this file should look like this:

 # Define 1 real worker using ajp13
 worker.list=worker1
 # Set properties for worker1 (ajp13)
 worker.worker1.type=ajp13
 worker.worker1.host=<hostName>
 worker.worker1.port=8009

- edit your <Apache>\conf\httpd.conf file to load the mod_jk.so module, start the above worker, and add the FME Server url patterns.

Below is an example for windows:

 # Update this path to match your modules location
 LoadModule    jk_module  C:\Apache22\modules\mod_jk.so  
 # Declare the module for <IfModule directive> (remove this line on Apache 2.x)
 #AddModule     mod_jk.c
 # Where to find workers.properties
 # Update this path to match your conf directory location (put workers.properties next to httpd.conf)
 JkWorkersFile C:\Apache22\conf\workers.properties
 # Where to put jk shared memory
 # Update this path to match your local state directory or logs directory
 JkShmFile    C:\Apache22\logs\mod_jk.shm
 # Where to put jk logs
 # Update this path to match your logs directory location (put mod_jk.log next to access_log)
 JkLogFile     C:\Apache22\logs\mod_jk.log
 # Set the jk log level [debug/error/info]
 JkLogLevel    info
 # Select the timestamp log format
 JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
 # Send everything for context /examples to worker named worker1 (ajp13)
 JkMount /SpatialDirect worker1
 JkMount /SpatialDirect/* worker1
 JkMount /fmeserver/* worker1
 JkMount /fmeserver worker1
 JkMount /fmeserverfiledownload worker1
 JkMount /fmeserverfiledownload/* worker1
 JkMount /fmeserverkmllinkdownload worker1
 JkMount /fmeserverkmllinkdownload/* worker1
 JkMount /fmeserverstreamdownload worker1
 JkMount /fmeserverstreamdownload/* worker1
 JkMount /fmedatadownload worker1
 JkMount /fmedatadownload/* worker1
 JkMount /fmekmllink worker1
 JkMount /fmekmllink/* worker1
  JkMount /fmedatastreaming worker1
 JkMount /fmedatastreaming/* worker1
 JkMount /fmeogc worker1
 JkMount /fmeogc/* worker1

- restart Apache and restart Tomcat

- start FME Server

- you should now able to get to the FME Server home page without specifying port 80 using the following url:

http://<hostName>/fmeserver

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