Versions Compared

Key

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

...

The communication between the HTTP server and Geronimo can also be also done via AJP connectors. By default, both Apache Geronimo distributions (Jetty and Tomcat) have already predefined one AJP13 connector listening on port 8009.

The Jakarta Tomcat Connector mod_jk module is provided as a connector from Apache Tomcat source, . Both Jetty ( and obviously Tomcat ) is are fully compatible with this connector. This module is avaiable available when you download the Tomcat source, but you can also is available for download it separately. Refer to See http://tomcat.apache.org/download-connectors.cgi for the proper version for your system.

In addition to the mod_jk, you will require a workers.properties file, also available with the Apache Tomcat source distribution. This properties file tells the mod_jk plugin how to connect to the Geronimo server. For a detailed explanation on all the available options for configuring the Jakarta Tomcat Connector, visit http://tomcat.apache.org/connectors-doc/config/workers.html.

...

Download the appropriate mod_jk for your platform from the Tomcat web site. For this particular example, rename it to mod_jk.so and copy it into the <httpd_home>\modules directory. Download and extract the workers.properties file from the Apache Tomcat source (alternatively, download it from the Attachments section) to the <httpd_home>\conf directory.

...

JkMount will map anything behind /console/ to the worker ajp13. The name ajp13 is defined in the workers.properties file, which is described nextin the following section. You will might need to add more JkMount directives depending on the applications you want to be accessed via the remote HTTPd.

Warning

In this example, the console has been enabled just for demonstation demonstration purposes. In a production environment, you will do not want to have the console accessible from the other network (normally the Internet). Having the console accessible represents a big security exposure.

The rule is that everything should have restricted access. Normally, normally a firewall would be placed in between the HTTP and the application server (depending on the topology) and you should map just the minumum minimum resources necessary to have your application working from the other side.

...

Configure workers.properties

The workers.properties file, among other things, tells the HTTPd where the Geronimo server is, what version of AJP should to use and the port where Geronimo is listening.

...

No Format
borderStylesolid
titleMinimum requirements for the workers.properties
worker.ajp13.type=ajp13
# Sets the version of AJP used. The AJP listeners defined in Geronimo are AJP v13.

worker.ajp13.host=localhost
# Specifies the location of the Geronimo server. Use default localhost for single-tier scenarios. Specify the
# hostname of the Geronimo server for multi-tier environments.

worker.ajp13.port=8009
# Both Tomcat and Jetty come with a predefined AJP13 listener on port 8009

From this example, note how the name of the worker is defined, look . Look at the variables definition worker.ajp13. , where ajp13 is the worker name you specified earlier in the httpd.conf file.

As a the last step, stop and restart the Apache HTTPd to ensure these changes are loaded.

...

For testing this configuration, make sure both Geronimo and HTTPd are up and running.

  1. Check Geronimo connectivity by accessing http://localhost:8080/console , you should see the Geronimo Administration Console.
  2. Check HTTPd connectivity by accessing http://localhost , you should see the Apache HTTPd welcome page.
  3. Check the HTTPd - Geronimo request forwarding by accessing http://localhost/console/ , you shoud be redirected to the Geronimo Administration Console. Note that at the end of the URL, there is a "/", failing to include this / will result in a Not Found error triggered by the Jakarta Tomcat Connector module.

...