This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Configuring Apache to pass requests to Tomcat is a common problem. (Obviously, this particular configuration task is not easy enough. ebu solves this by using just Tomcat, but that won't work if you want high performance or a swiss army knife...;)

The instructions below assume you have basic knowledge of setting up apache and tomcat. At the very least, you need to know where your installations configuration files are and must be able to adjust the example paths to suit your setup.

The real HOWTO's#

The kind people at the Jakarta project have documented Apache-Tomcat configuration. Select your series, follow the Documentation links, and look for "Integrating Tomcat with a web server" (3.x series) or "JK documentation" (4.x series).

Use mod_jk#

Don't bother with jserv any more. Just use the mod_jk Apache module. Each Tomcat series has a section on setting mod_jk up; make sure you pick the version you're running to avoid complications.

Apache 1.3.x and Tomcat 3.2.x#

A configuration we've tested JSPWiki on uses Ajp12 with Tomcat 3.2.x, Apache 1.3.x and mod_jk. In apache's httpd.conf add the following line at the very end:

    Include /p/web/tomcat/current/conf/mod_jk.conf.local

This is the relevant snippet from mod_jk.conf.local:

# The following line makes apache aware of the location of the /JSPWiki context
Alias /JSPWiki "/p/web/tomcat/current/webapps/JSPWiki"
<Directory "/p/web/tomcat/current/webapps/JSPWiki">
    Options Indexes FollowSymLinks
    allow from all

# The following line mounts all JSP files and RPC2 uri to tomcat
JkMount /JSPWiki/*.jsp ajp12
JkMount /JSPWiki/ ajp12
JkMount /JSPWiki/RPC2/* ajp12

# The following line prohibits users from directly accessing WEB-INF
<Location "/JSPWiki/WEB-INF/">
    AllowOverride None
    deny from all

# The following line prohibits users from directly accessing META-INF
<Location "/JSPWiki/META-INF/">
    AllowOverride None
    deny from all

And this is what we have in Tomcat's servlet.xml:

       <!-- Apache AJP12 support. This is also used to shut down tomcat.
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
            <Parameter name="port" value="8007"/>

(to be continued)

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
mod_jk.conf.tomcat4_example 3.0 kB 1 10-Jan-2003 13:22 Ebu
tomcat4_example 0.4 kB 1 11-Jan-2003 02:59
« This particular version was published on 10-Jan-2003 13:05 by Ebu.