Web - Apache and Tomcat Integration
From Fmepedia
(http://fmepedia.com/index.php/Category:FME_Server)
Tested on Windows XP Professional SP2, Apache 2.2.8, Tomcat 5.5.26 and FME Server B5204_5346, also tested on Tomcat 6.0.16
| 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.
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
Quick link to connector mod_jk-<version>.so (http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.26/). 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 /SpatialDirect ajp13
JkMount /SpatialDirect/* 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 /fmeserver ajp13
JkMount /fmeserver/* ajp13
JkMount /fmedatadownload ajp13
JkMount /fmedatadownload/* ajp13
JkMount /fmedatastreaming ajp13
JkMount /fmedatastreaming/* ajp13
JkMount /fmekmllink ajp13
JkMount /fmekmllink/* ajp13
JkMount /fmeogc ajp13
JkMount /fmeogc/* ajp13
JkMount /fmesoap ajp13
JkMount /fmesoap/* ajp13
</VirtualHost>
4. Copy the created file mod_jk.conf into folder <Apache installed Dir>\conf\
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.
