Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Ask simple, focused questions
  • Provide all of the requested information (inline, since the mailing list strips most attachments)
  • Try to format configuration files reasonably
    • Remove comments
    • Be aware of word wrap
    • Don't use rich text / html text

Be aware that people on the mailing list are volunteers. Do not expect homework answers, complete web applications, or systems architecture from the list. Do expect to put in at least as much effort on solving the problem as the people helping you are.

...

  • apr
  • apr-util
  • apr-devel
  • apr-util-devel
  • httpd
  • httpd-devel
  • httpd-tools

The -devel packages are very important, since you will be building mod_jk from source.

...

While other people have had difficulty (search the mailing list) building mod_jk on various platforms, I've never had much trouble. The steps are quite simple, provided you have the appropriate packages installed on your system.






  1. Wiki Markup
    Download the source from http://tomcat.apache.org/download-connectors.cgi 2. Unpack it into a directory 3. cd to \[tomcat-connectors-1.xx\]/native 4. Read BUILDING.txt
    \\






Following BUILDING.txt:

  1. ./configure --with-apxs=/usr/sbin/apxs 2. make 3. su to root 4. cd back to where you were 5. make install

This will put everything in the right place.

mod_jk configuration






Wiki Markup
Recent versions of mod_jk come with some very nice and well-commented examples. They can be found in \[tomcat-connectors-1.xx\]/conf. Read them, follow them, use them.






The defaults have been chosen to work in most general use cases.

...

  1. Each worker name in a cluster must be unique 2. The worker name must be the same as the jvmRoute attribute set in the Engine element of the target Tomcat 3. The worker name must be in a list of worker names for a loadbalancer

The mapping in uriworkermap.properties should point to the new loadbalancer worker instead of an individual worker.

...

  1. Change the SHUTDOWN port to not conflict with the first Tomcat 2. Change the HTTP/1.1 port to not conflict with the first Tomcat (useful for testing) 3. Change the AJP/1.3 port to match that configured in workers.properties 4. Change the jvmRoute attribute of the Engine element to match the correct worker name 5. Configure the manager application (useful for testing)

Tomcat clustering configuration

...

  1. Make sure that each Tomcat has a unique jvmRoute in the Engine element (see above) 2. Make sure that the jvmRoute matches the correct worker name (see above) 3. Make sure that each Tomcat has a unique shutdown port (see above) 4. Make sure that each Tomcat has a unique AJP/1.3 port (see above) 5. Make sure that each AJP/1.3 port matches the correctly named worker in workers.properties (see above) 6. Make sure that each HTTP/1.1 port is unique (nice for manager access) 7. Copy the example configuration from:

http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

...

  1. Stock Apache HTTPD installation (and verify) 2. Stock Apache Tomcat installation (and verify) 3. mod_jk installation (and verify) 4. Second Apache Tomcat installation (and verify) 5. Cluster

...

  1. Cluster