Mike, First off, thanks for working on this doc -- it's great to see someone bringing the user docs for mod_jk up to date. However, two things: 1) If you can run 'diff -u' (if you've got it from cvs, 'cvs diff -u'), it will produce the diff in "unified" format, which makes it possible to merge changes via the patch program. Without that, I'd have to apply things more or less by hand. 2) Chris Pepper actually submitted some fixes to this same doc (mostly reformating the HTML and fixing typos), which I have, but haven't yet committed (my fault). I want to apply both of your fixes. I'm attaching a copy of his patch. If you want to make me a very happy committer, you could apply his patch to the current version under cvs, make your changes, and then produce a diff from that (I'll then apply that and credit you both). If you want to make me merely a fairly happy committer, you can say, "I'm too busy to do that Dan, so I'm just running diff -u for my fixes based on what's currently in cvs, and I'll send you that". Then I can merge your and Chris's work myself (which won't kill me, and will teach me to commit things which are sent in!). -Dan Mike Braden wrote: > > This patch updates the mod_jk-howto.html to include the latest changes for > TC3.3's mod_jk configuration files. > > Updates: > > - Updated section on configuring Tomcat to include setting up the > <ApacheConfig /> tag > - Updated path references to the mod_jk.conf-auto and workers.properties > from conf/ to conf/jk/ > > Mike. > -- > Mike Braden > [EMAIL PROTECTED] > [EMAIL PROTECTED] > <<patchfile.txt>> > > ---------------------------------------------------------------------------- > Name: patchfile.txt > patchfile.txt Type: Plain Text (text/plain) > Encoding: quoted-printable > > ---------------------------------------------------------------------------- > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] -- Dan Milstein // [EMAIL PROTECTED]Index: mod_jk-howto.html =================================================================== RCS file: /home/cvspublic/jakarta-tomcat/src/doc/mod_jk-howto.html,v retrieving revision 1.4 diff -u -d -b -r1.4 mod_jk-howto.html --- mod_jk-howto.html 2000/10/11 19:11:54 1.4 +++ mod_jk-howto.html 2001/02/28 15:24:04 @@ -61,7 +61,7 @@
- Removing the mod_jserv directives -
- Obtaining mod_jk +
- Obtaining and building mod_jk
- Configuring Tomcat to use the Ajpv13 protocol
- Defining workers for mod_jk
- Configuring Apache to use mod_jk @@ -105,7 +105,7 @@
- Make sure you have Perl 5 installed. The apxs script - used to build the module is written in Perl. +
- Make sure your Apache has DSO support. You can check this + with $APACHE_HOME/bin/httpd -l. If you see + "mod_so.c" in the output, DSO support is available. If it's + missing, you may have to recompile or reinstall Apache. + +
- Find out whether your Apache has EAPI support. If you + compiled it yourself from source, EAPI is probably not compiled + in, unless you added it yourself (perhaps with mod_ssl). You + need to build mod_jk.so with or without EAPI to match your + Apache configuration. If you install a mismatched mod_jk.so, + $APACHE_HOME/bin/apachectl configtest will warn + you. +
- Make sure you have Perl 5 installed. The apxs + script used to build the module is written in Perl. +
- Change directory to - jakarta-tomcat/src/native/apache1.3 (or apache2.0). + jakarta-tomcat/src/native/apache1.3 (or + apache2.0). -
- Build mod_jk.so.
+ -
+
Build mod_jk.so. Following are three techniques you can try, + in order of simplicity:
- Following are three alternate techniques you can try, in order of - simplicity. +-
+
- Run ./build-unix.sh, if present in this
+ directory. This script will set some variables, call
+ apxs as below, and try to copy mod_jk.so to
+ $APACHE_HOME/libexec. If it fails, you need to do
+ the following manually:
-
-
- Option 1: Run ./build-unix.sh . This script will set some
- variables, call apxs as below, and try to copy mod_jk.so to
- $APACHE_HOME/libexec. If it fails, you may need to do the following:
-
-
-
- set JAVA_HOME in your shell, e.g. "set JAVA_HOME=/usr/local/jdk1.2.2; export JAVA_HOME" -
- set APACHE_HOME in your shell, e.g. "set APACHE_HOME=/usr/local/apache; export APACHE_HOME" -
- uncomment the following line in the build-unix.sh file, - replacing "linux" with the name of your platform as specified in the +
- set JAVA_HOME in your shell, e.g. "set + JAVA_HOME=/usr/local/jdk1.2.2; export + JAVA_HOME" +
- set APACHE_HOME in your shell, e.g. + "set APACHE_HOME=/usr/local/apache; + export APACHE_HOME" +
- uncomment the following line in the
+ build-unix.sh file,
+ replacing "linux" with the name of your
+ platform as specified in the
Java include directory for your installation
-
-# JAVA_INCLUDE="-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux" -
-
- - Option 2: If build-unix.sh fails, you may have better luck with the
- Makefiles in the same directory. E.g. "make -f Makefile.linux mod_jk.so"
+
+
# JAVA_INCLUDE="-I + ${JAVA_HOME}/include -I + ${JAVA_HOME}/include/linux"
- - Option 3: Finally, you can try to build it manually. Run the apxs command that came with your apache distribution (hint: look in /usr/local/apache/bin, /usr/sbin, or wherever you intalled apache). Type the command all on one line.
- For Solaris:
-apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/java/include -I/usr/java/include/solaris -c *.c ../jk/*.c
- On some systems, this will build the module correctly, but will fail at runtime with a "symbol "fdatasync" not found". To fix, add -lposix4 just before the -c in the above command.
- For Linux: -apxs -o mod_jk.so -I../jk -I/usr/local/jdk/include -I/usr/local/jdk/include/linux -c *.c ../jk/*.c
- Your build may fail because the object files from the ../jk directory have been compiled to the current directory, rather than their source directory. Running gcc -shared -o mod_jk.so *.o should finish the build.
- (If you've installed Java in another directory, adjust accordingly). For other *nixes you should be able to work it out, but remember that the order of the arguments to apxs is important!. -
+ +
- - Option 1: Run ./build-unix.sh . This script will set some
- variables, call apxs as below, and try to copy mod_jk.so to
- $APACHE_HOME/libexec. If it fails, you may need to do the following:
-
- - Run ./build-unix.sh, if present in this
+ directory. This script will set some variables, call
+ apxs as below, and try to copy mod_jk.so to
+ $APACHE_HOME/libexec. If it fails, you need to do
+ the following manually:
- Copy mod_jk.so to Apache's libexec directory. (Note that - build-unix.sh attempts to do this, but you may have to "su root" - first.) + +
- If build-unix.sh fails, you may have better luck + with the Makefiles in the same directory, e.g. + "make -f Makefile.linux mod_jk.so" + + +
-
+
Finally, you can try to build it manually. Run the + apxs command that came with your apache + distribution (hint: look in /usr/local/apache/bin, + /usr/sbin, or wherever you installed apache). Type the + command all on one line.
+ +
+ +For Linux:
+ +apxs -o mod_jk.so -I../jk + -I/usr/local/jdk/include -I/usr/local/jdk/include/linux + -c *.c ../jk/*.c
+ +Your build may fail because the object files from + the ../jk directory have been compiled to the + current directory, rather than their source directory. + Running gcc -shared -o mod_jk.so *.o + should finish the build.
+ +
+ +For Solaris:
+ +$APACHE_HOME/bin/apxs -o mod_jk.so + -DSOLARIS -I../jk -I/usr/java/include + -I/usr/java/include/solaris -c *.c + ../jk/*.c
+ +On some systems, this will build the module + correctly, but will fail at runtime with a + "symbol "fdatasync" not found". To + fix, add -lposix4 just before the + -c in the above command.
+ +
+ +For other Unixes (including FreeBSD):
+ +You may need to replace fdatasync() with fsync() in + jk_util.c.
+ +
+ +If you are using EAPI, try adding + -DEAPI to the apxs command after + mod_jk.so.
+ +If apxs fails with
+ +apxs:Break: Command failed + with rc=255
, it may have been damaged by + mod_ssl. Search for:my $CFG_LD_SHLIB = q(); # substituted via Makefile.tmpl +my $CFG_LDFLAGS_SHLIB = q(); # substituted via Makefile.tmpl +
+ +and change to:
+ +my $CFG_LD_SHLIB = q(ld); # substituted via Makefile.tmpl +my $CFG_LDFLAGS_SHLIB = q(-G); # substituted via Makefile.tmpl +
+ +If you've installed Java in another directory, + adjust accordingly.
+ +For other Unixes you should be able to work it out, + but remember that the order of the arguments to + apxs is important!.
+
+
+ - cp mod_jk.so $APACHE_HOME/libexec. (Note that + build-unix.sh attempts to do this, but you may have to + su first.)
- [PATCH] Update to mod_jk-howto.html Mike Braden
- RE: [PATCH] Update to mod_jk-howto.html Dan Milstein
- RE: [PATCH] Update to mod_jk-howto.html Mike Braden
Definitions and terminology
-During this document I am going to use a few terms, so lets define them:
+During this document I am going to use a few terms, so let's define them: