Step 1: Configuring Apache Tomcat
- Open server.xml for editing (/path/to/your/apache-tomcat/conf/server.xml)
Comment out the default connector as shown below:
Now, uncomment the following connector block (You may adjust the port if you wish)
Step 2: Configuring Apache Http Server
You will need to configure Apache to route requests to the AJP connector you configured in the previous part. You have two options, mod_jk and mod_proxy_ajp.
Option #1 mod_jk
mod_jk is officially known as the Apache Tomcat Connector and is an apache module. Some Linux distributions have a mod_jk package while others do not. If you are on Windows or a Linux distribution without this package it must be downloaded separately from http://tomcat.apache.org/connectors-doc/ and compiled against your Apache HTTP Server source. mod_jk has a slightly more complex configuration, but a different feature set than mod_proxy_ajp.
Note: Configuring with IIS use this link.... http://tomcat.apache.org/connectors-doc/reference/iis.html
- For Debian/Ubuntu distros
Navigate to the Apache Mod_JK configuration directory
Edit httpd-jk.conf, adding the JK Mounts for uPortal. In the sample below, most of the portlets have mount points
Edit worker.properties. The file is well documented, so read through it first. We want to set the some locations and add loadbalancer to worker list
Add JK mounts to VirtualHost of desired site, i.e. /etc/apache2/sites-enabled/default-ssl.conf
Restart Apache after checking syntax of config files is okay
- For other distributions
- Download the Apache Tomcat connector
Navigate to your Apache config directory
Open httpd.conf for editing and locate the LoadModule section and make sure you have the mod_jk path defined (path may vary).
In the same file, httpd.conf, define the IfModule directive
Now, we need to configure the workers.properties file ( You may include the workers.properties file in the Apache config directory, but the path must match with the httpd.conf file where you defined the JkWorkersFile path above.)
More information about workers.properties can be found under the Additional References section below
Option #2 mod_proxy/mod_proxy_ajp
mod_proxy_ajp is an extension of Apache mod_proxy that implements the AJP protocol. It is bundled with Apache httpd Server 2.2 and later and can be added to your server instance by adding the following options to your configure invocation:
mod_proxy_ajp offers simple configuration, particularly if you are already familiar with mod_proxy.
After you have configured Tomcat in Step 1 you will now need to go to your Apache config directory to setup mod_proxy
Open httpd.conf for editing and uncomment the following modules
You may chose to keep mod_proxy_ajp configurations separate by creating a new file (i.e., mod_proxy_ajp.conf), but you will need to map this path in your httpd.conf file
Whether you place your mod_proxy_ajp configurations in a separate file or in the httpd.conf is entirely up to you, but you will need to include the following information.
- The IP address and port number in the ProxyPass match the port you defined in the Tomcat AJP 1.3 Connector (Step 1)