The Apache web server configuration for Tomcat load balancing involves enabling the AJP13 protocol for communicating with the load balancer and adding a number of definitions that reference the load balancer.
Note: Tomcat load balancing can be done with web servers other than Apache. However, only the Apache configuration is described because Apache is a common web server, and it is not practical to describe the configuration details of all the available web servers.
  1. Open the Apache /conf/httpd.conf file and un-comment the LoadModule directives in the httpd.conf file that enable AJP13. The LoadModule directives include:
    • LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    • LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    Note: Depending on which version of the Apache server you are using, there may be additional modules required. See the Apache Web site (http://httpd.apache.org/) for documentation on your version of the Apache server.
  2. Add the following definitions to /conf/httpd.conf:
    #workers.properties load balancing config
    
          LoadModule jk_module apache_install_dir/modules/mod_jk.so
          JkWorkersFile apache_install_dir/conf/workers.properties
          JkShmFile apache_install_dir/logs/mod_jk.shm
          JkLogFile apache_install_dir/logs/mod_jk.log
          JkLogLevel info
          JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
          JkMount /* jklb
  3. Use PASMAN to enable the AJP13 port in the /conf/server.xml file.

    For example:

    pasman.[sh|bat] -I instance-name feature AJP13=on
  4. Update the AJP connector section in server.xml with secretRequired="false”
    <!-- feature:begin:AJP13:on -->
        <Connector executor="tomcatThreadPool"
                   address="${psc.as.ajp13.address}"
                   port="${psc.as.ajp13.port}" 
                   protocol="AJP/1.3" 
                   asyncTimeout="${psc.as.msg.timeout}"
                   maxPostSize="${psc.as.msg.maxpostsize}"
                   acceptCount="${psc.as.http.maxqueuesize}"
                   maxConnections="${psc.as.http.maxconnections}"
                   tomcatAuthentication="${psc.as.ajp13.tomcatauth}"
                   redirectPort="${psc.as.https.port}" 
                   URIEncoding="${psc.as.http.uriencoding}" 
                   secretRequired="false" />
        <!-- feature:end:AJP13:on -->
    
  5. Update the ajp13 address to receive connections from anywhere (Update if pasoe and load balancer are on different machines) - Update property in instance/conf/catalina.properties as follows:
    psc.as.ajp13.address=::

Apache now passes all requests to a PAS for OpenEdge load balancing instance through its AJP13 port.

Note: The PAS for OpenEdge load balancing instance is referenced in the previous example as jklb (JkMount /* jklb). The actual instance name must be lb.