<%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>

Apache mod_jk -- Configuration Results

This page lists the things you must do to enable mod_jk in Apache and configure it to talk to Geronimo.

Step 1: Configure Geronimo for AJP

This Geronimo configuration already has an AJP listener running on port ${ajpPort}. Nothing further needs to be done here.

An AJP lisstner was added on port ${ajpPort}. Nothing further needs to be done here.

Step 2: Install mod_jk

On ${model.os}, you can install mod_jk using an RPM. This does not activate it in Apache, but it at least installs the binary in the right location. To install, find the following RPM on your install media and run a command like this:

rpm -Uvh mod_jk-1.2.6-3jpp_4fc.i586.rpmapache2-jakarta-tomcat-connectors-4.1.27-32.i586.rpmapache2-jakarta-tomcat-connectors-5.0.19-13.i586.rpmmod_jk-ap20-4.1.30-3.i586.rpmmod_jk-ap20-4.1.30-3.i586.rpmmod_jk-ap20-4.1.30-3.i586.rpm
        

Once the mod_jk RPM is installed, you can activate it by editing /etc/sysconfig/apache2 and adding jk to the value configured for APACHE_MODULES and then running (as root) SuSEconfig followed by rcapache2 start (or rcapache2 restart). adding the following line to /etc/httpd/conf/httpd.conf:

LoadModule jk_module modules/mod_jk.so

Then you can start Apache by running service httpd start (or service httpd restart).

Based on your operating system selection, I don't have specific instructions to install mod_jk. You may be able to get a binary release from http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/. Otherwise, you'll have to build from source.

To enable mod_jk in Apache, you typically need to install the .so (Linux/UNIX/Mac OS X) or .dll (Windows) and then add a line to the httpd.conf file like this:

LoadModule jk_module modules/mod_jk.so

Finally, start or restart Apache.

Step 3: Create a workers.properties file

You've decided to save this file at ${model.workersPath}. Please save the following content to that file.

worker.list=geronimo_ajp13
worker.geronimo_ajp13.port=${ajpPort}
worker.geronimo_ajp13.host=localhost
worker.geronimo_ajp13.type=ajp13

Step 4: Apache Configuration

The following information needs to go into your Apache Configuration.

For SuSE, this should be saved to a file in the Apache conf.d dir, e.g. write this content to /etc/apache2/conf.d/geronimo-jk.conf

This information should be added to the Apache configuration file. This is often at a location such as /etc/httpd/conf/httpd.conf

<IfModule mod_jk.c>
    JkWorkersFile ${model.workersPath}
    JkLogFile ${model.logFilePath}
    JkLogLevel error

    JkMount ${web.contextRoot} ajp13
    Alias ${web.contextRoot} "${web.webAppDir}"
    <Directory "${web.webAppDir}">
        Options Indexes FollowSymLinks
        allow from all
    </Directory>
    <Location "${web.contextRoot}/WEB-INF/">
        AllowOverride None
        deny from all
    </Location>

</IfModule>

Step 5: Restart Apache

With those steps completed, Apache should be ready to go! Start Geronimo and restart Apache and try accessing a Geronimo web application through an Apache URL. If there are any problems, check the Apache error log, and the mod_jk error log (at ${model.logFilePath}).

">Done