initial import of mod_jk 1.2.5

mod_jk is a DSO module for Apache 1.3.  It connects Apache to Tomcat.
mod_jk can be configured to off-load SSL processing to Apache, serve
static content for webapps and load balance multiple Tomcat servers.

WWW: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/

from Kurt Miller <truk at apache dot org>
This commit is contained in:
sturm 2004-01-02 08:19:54 +00:00
parent b929036cda
commit 5108714805
12 changed files with 336 additions and 0 deletions

62
www/mod_jk/Makefile Normal file
View File

@ -0,0 +1,62 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
# This port currently only works with archs supporting dynamic loading
# and has Apache that supports DSO's.
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
COMMENT= "Apache-Tomcat AJP Connector"
V= 1.2.5
DISTNAME= jakarta-tomcat-connectors-jk-${V}-src
PKGNAME= mod_jk-${V}
CATEGORIES= www
HOMEPAGE= http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/
MAINTAINER= Kurt Miller <truk@apache.org>
# Apache Software License
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_APACHE:=jakarta/tomcat-connectors/jk/source/}
SEPARATE_BUILD= concurrent
NO_REGRESS= Yes
USE_LIBTOOL= Yes
USE_GMAKE= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --with-apxs=/usr/sbin/apxs
CONFIGURE_ENV+= CFLAGS='${CFLAGS} -DCHROOTED_APACHE'
WRKSRC= ${WRKDIR}/${DISTNAME}/jk/native
EXAMPLES= mod_jk.conf workers.properties
DOCDIR= ${PREFIX}/share/doc/mod_jk
SUBST_VARS= DOCDIR
post-build:
strip ${WRKBUILD}/apache-1.3/mod_jk.so.0.0
do-install:
sed 's,/usr/local,${TRUEPREFIX},' \
< ${FILESDIR}/mod_jk-enable >${WRKSRC}/mod_jk-enable
${INSTALL_SCRIPT} ${WRKSRC}/mod_jk-enable ${PREFIX}/sbin/mod_jk-enable
${INSTALL_DATA} ${WRKBUILD}/apache-1.3/mod_jk.so.0.0 ${PREFIX}/lib/mod_jk.so
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mod_jk
.for file in ${EXAMPLES}
${INSTALL_DATA} ${FILESDIR}/${file} ${PREFIX}/share/examples/mod_jk
.endfor
${INSTALL_DATA_DIR} ${DOCDIR}
sed 's,/usr/local,${TRUEPREFIX},' \
< ${FILESDIR}/README.OpenBSD >${WRKSRC}/README.OpenBSD
${INSTALL_DATA} ${WRKSRC}/README.OpenBSD ${DOCDIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/LICENSE ${DOCDIR}
cd ${WRKDIR}/${DISTNAME}/jk/docs && \
find . -type d -exec ${INSTALL_DATA_DIR} ${DOCDIR}/{} \; && \
find . -type f -exec ${INSTALL_DATA} {} ${DOCDIR}/{} \;
.include "bsd.port.mk"

3
www/mod_jk/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz) = 55727c871286e010222bb0fb91f21d08
RMD160 (jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz) = 71f2577aeff0d05103536c1aee87c3a05bf8bd0e
SHA1 (jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz) = 46f0c58c2db11f392471866cf2a3678f2e99935d

View File

@ -0,0 +1,58 @@
$OpenBSD: README.OpenBSD,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
OpenBSD mod_jk Package
Apache-Tomcat AJP Connector
Apache, chroot(2) and mod_jk:
Apache on OpenBSD is chrooted by default into /var/www. When restarting
Apache (i.e. apachectl restart) mod_jk will not be reloaded because mod_jk.so
resides outsite of /var/www. All Apache DSO modules have this problem.
mod_jk AJP13 Basic Setup:
Steps 1-6 cover how to get mod_jk configured to work with a single Tomcat
server (local or remote) where Tomcat serves both the static and dynamic
content for the default installed Tomcat contexts. If this is your first time
using mod_jk, start here and get this working first. This section assumes
that you have installed Tomcat and can access the examples context directly
(i.e. http://your.tomcat.host:8080/examples/).
1) Enable the module by executing /usr/local/sbin/mod_jk-enable with root
privileges (using sudo).
2) Copy /usr/local/share/examples/mod_jk/workers.properties to
/var/www/conf/jk/workers.properties (create /var/www/conf/jk/ if necessary).
If Tomcat is installed on another machine, edit and change the
`worker.ajp13.host' line to the hostname or IP address of the location of
Tomcat.
3) Copy /usr/local/share/examples/mod_jk/mod_jk.conf to
/var/www/conf/jk/mod_jk.conf.
4) Edit /var/www/conf/httpd.conf and add the following line at the end of
the file:
Include /var/www/conf/jk/mod_jk.conf
5) Stop and start Apache using apachectl(1)
6) Test mod_jk by accessing the url http://your.apache.host/examples/.
mod_jk Resources:
The mod_jk documentation is installed in /usr/local/share/doc/mod_jk. Example
files for this README are located in /usr/local/share/examples/mod_jk.
On-line documentation is here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/
The mailing list archives for tomcat-user can be found at:
http://marc.theaimsgroup.com/
Configuration questions can be asked (after checking archives of course)
by subscribing to the tomcat-user mailing list. Instructions for subscribing
can be found here:
http://jakarta.apache.org/site/mail2.html#Tomcat

View File

@ -0,0 +1,17 @@
#!/bin/sh
#
# $OpenBSD: mod_jk-enable,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
HTTPD_CONF=`apxs -q SYSCONFDIR`/httpd.conf
MODULE=/usr/local/lib/mod_jk.so
if [ ! -f ${MODULE} ]; then
echo "can't find mod_jk module (${MODULE})"
exit 1
else
echo "enabling mod_jk (Apache-Tomcat AJP Connector)..."
apxs -i -a -n jk ${MODULE}
fi

View File

@ -0,0 +1,16 @@
JkWorkersFile "/var/www/conf/jk/workers.properties"
JkLogFile "/var/www/logs/mod_jk.log"
JkLogLevel error
JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /webdav ajp13
JkMount /webdav/* ajp13
JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13
JkMount /manager ajp13
JkMount /manager/* ajp13

View File

@ -0,0 +1,18 @@
# BEGIN workers.properties
#
# Setup for apache system
#
ps=/
worker.list=ajp13
# Definition for Ajp13 worker
#
# Change the worker.ajp13.host entry to the location of your
# Tomcat server.
worker.ajp13.type=ajp13
worker.ajp13.port=8009
worker.ajp13.host=127.0.0.1
#
# END workers.properties

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-jk_native_apache-1_3_mod_jk_c,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
--- jk/native/apache-1.3/mod_jk.c.orig 2003-09-06 17:37:20.000000000 +0200
+++ jk/native/apache-1.3/mod_jk.c 2004-01-02 08:56:52.000000000 +0100
@@ -1598,7 +1598,7 @@ static int jk_handler(request_rec *r)
}
micro = tv_end.tv_usec - tv_begin.tv_usec;
seconds = tv_end.tv_sec - tv_begin.tv_sec;
- duration = ap_psprintf(r->pool,"%.1d.%.6d",seconds,micro);
+ duration = ap_psprintf(r->pool,"%.1ld.%.6ld",seconds,micro);
ap_table_setn(r->notes, JK_DURATION, duration);
request_log_transaction(r,conf);
}

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-jk_native_common_jk_pool_c,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
--- jk/native/common/jk_pool.c.orig 2002-09-25 00:35:05.000000000 +0200
+++ jk/native/common/jk_pool.c 2004-01-02 08:56:52.000000000 +0100
@@ -177,13 +177,13 @@ void *jk_pool_strdup(jk_pool_t *p,
void jk_dump_pool(jk_pool_t *p,
FILE *f)
{
- fprintf(f, "Dumping for pool [%x]\n", p);
+ fprintf(f, "Dumping for pool [%p]\n", p);
fprintf(f, "size [%d]\n", p->size);
fprintf(f, "pos [%d]\n", p->pos);
- fprintf(f, "buf [%x]\n", p->buf);
+ fprintf(f, "buf [%p]\n", p->buf);
fprintf(f, "dyn_size [%d]\n", p->dyn_size);
fprintf(f, "dyn_pos [%d]\n", p->dyn_pos);
- fprintf(f, "dynamic [%x]\n", p->dynamic);
+ fprintf(f, "dynamic [%p]\n", p->dynamic);
fflush(f);
}

27
www/mod_jk/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,27 @@
#!/bin/sh
#
# $OpenBSD: DEINSTALL,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
#
# mod_jk de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
CONF=`apxs -q SYSCONFDIR`/httpd.conf
rm -f /usr/lib/apache/modules/mod_jk.so
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you"
echo "| need to perform these steps as root:"
echo "|"
echo "| edit ${CONF}"
echo "| and remove the lines"
echo "| 'LoadModule jk_module'"
echo "|"
echo "| Do not do this if you plan on re-installing mod_jk"
echo "| package at some future time."
echo "+---------------"
echo
exit 0

6
www/mod_jk/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
mod_jk is a DSO module for Apache 1.3. It connects Apache to Tomcat.
mod_jk can be configured to off-load SSL processing to Apache, serve
static content for webapps and load balance multiple Tomcat servers.
See ${DOCDIR}/README.OpenBSD for more information on using mod_jk on
OpenBSD.

55
www/mod_jk/pkg/INSTALL Normal file
View File

@ -0,0 +1,55 @@
#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
#
# mod_jk installation
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
do_notice()
{
echo
echo "+---------------"
echo "| To finish the install, you need to enable the mod_jk"
echo "| module using the following command as root:"
echo "|"
echo "| ${PREFIX}/sbin/mod_jk-enable"
echo "|"
echo "| If you already have Apache running on your machine,"
echo "| you should not use "apachectl restart" - instead,"
echo "| you should fully stop and then start the server."
echo "|"
echo "| Please see ${DOCDIR}/README.OpenBSD"
echo "| for more information."
echo "|"
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
do_notice $1
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

42
www/mod_jk/pkg/PLIST Normal file
View File

@ -0,0 +1,42 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/01/02 08:19:54 sturm Exp $
lib/mod_jk.so
sbin/mod_jk-enable
share/doc/mod_jk/LICENSE
share/doc/mod_jk/README.OpenBSD
share/doc/mod_jk/common/AJPv13-extensions-proposal.html
share/doc/mod_jk/common/AJPv13.html
share/doc/mod_jk/common/doccontrib.html
share/doc/mod_jk/common/tools.html
share/doc/mod_jk/faq.html
share/doc/mod_jk/images/corner.gif
share/doc/mod_jk/images/jakarta.gif
share/doc/mod_jk/images/jk2.gif
share/doc/mod_jk/images/jk2.png
share/doc/mod_jk/images/mod_jk.jpg
share/doc/mod_jk/images/pixel.gif
share/doc/mod_jk/images/tomcat.ico
share/doc/mod_jk/index.html
share/doc/mod_jk/jk/aphowto.html
share/doc/mod_jk/jk/domhowto.html
share/doc/mod_jk/jk/iishowto.html
share/doc/mod_jk/jk/neshowto.html
share/doc/mod_jk/jk/quickhowto.html
share/doc/mod_jk/jk/workershowto.html
share/doc/mod_jk/jk2/confighowto.html
share/doc/mod_jk/jk2/configtc.html
share/doc/mod_jk/jk2/configtccom.html
share/doc/mod_jk/jk2/configtcex.html
share/doc/mod_jk/jk2/configweb.html
share/doc/mod_jk/jk2/configwebcom.html
share/doc/mod_jk/jk2/configwebex.html
share/doc/mod_jk/jk2/installhowto.html
share/doc/mod_jk/jk2/vhosthowto.html
share/doc/mod_jk/style.css
share/examples/mod_jk/mod_jk.conf
share/examples/mod_jk/workers.properties
@dirrm share/examples/mod_jk
@dirrm share/doc/mod_jk/jk2
@dirrm share/doc/mod_jk/jk
@dirrm share/doc/mod_jk/images
@dirrm share/doc/mod_jk/common
@dirrm share/doc/mod_jk