tomcat和apache连接器mod_jk (Tomcat Connectors)
来源:互联网 发布:淘宝双十一价格规则 编辑:程序博客网 时间:2024/06/01 08:28
make
(动态的安装了mod_jk,安装程序作了:
cp .libs/mod_jk.so /usr/local/apache/modules/mod_jk.so
cp .libs/mod_jk.lai /usr/local/apache/modules/mod_jk.la
cp .libs/mod_jk.a /usr/local/apache/modules/mod_jk.a
)
Apache related parameters :
--with-apxs[=FILE]
FILE is the location of the apxs tool. Default is finding apxs in PATH. It builds a shared Apache module. It detects automaticly the Apache version.
--with-apache=DIR
DIR is the path where apache sources are located. The apache sources should have been configured before configuring mod_jk. DIR is something like: /home/apache/apache_1.3.33 It builds a static Apache module.
--enable-maitainer-mode
Build mod_jk enabling maintainer or DEBUG mode.
--enable-prefork
Build mod_jk without all the pthread code, better support apache prefork mode.
JNI related parameters :
--enable-jni
Build the JNI worker and so the build process will require some informations about your Java Environment. Most of the options are autodetected.
--with-java-home=DIR
DIR is the patch to the JDK root directory. Something like: /opt/java/jdk12
--with-os-type=SUBDIR
SUBDIR is the os-type subdirectory, configure should guess it correctly.
--with-arch-type=SUBDIR
SUBDIR is the arch subdirectory, configure should guess it correctly.
--with-java-platform=VAL
VAL is the Java platform 1 is 1.1.x and 2 is for 1.2 anf higher, configure should guess it correctly.
Examples of configure use :
?/P>
[user@host] ~ $ ./configure --with-apxs=/usr/sbin/apxs
[user@host] ~ $ make
[user@host] ~ $ su -c 'make install'
?/P>
[user@host] ~ $ ./configure --with-apxs=/opt/apache2/bin/apxs \
--with-java-home=${JAVA_HOME} --with-java-platform=2 \
--enable-jni
- Module Name: mod_jk.c
- Content handlers: yes
- Configuration Phase Participation: Create Server Config, Merge Server Configs
- Request Phase Participation: Translate Path
- Module Directives:
JkWorkersFile - the name of a worker file for the Jakarta servlet containers
JkMountFile - the name of a mount file for the Jakarta servlet uri mapping
JkAutoMount - automatic mount points to a Tomcat worker
JkMount - A mount point from a context to a Tomcat worker
JkUnMount - A no mount point from a context to a Tomcat worker
JkMountCopy - Should the base server mounts be copied to the virtual server
JkLogFile - Full path to the Jakarta Tomcat module log file
JkShmFile - Full path to the Jakarta Tomcat module shared memory file
JkShmSize - Size of the shared memory file in KBytes
JkLogLevel - The Jakarta Tomcat module log level, can be debug, info, error or emerg
JkLogStampFormat - The Jakarta Tomcat module log format, follow strftime synthax
JkRequestLogFormat - The Jakarta mod_jk module request log format string
JkAutoAlias - The Jakarta mod_jk module automatic context apache alias directory
JkHTTPSIndicator - Name of the Apache environment that contains SSL indication
JkCERTSIndicator - Name of the Apache environment that contains SSL client certificates
JkCIPHERIndicator - Name of the Apache environment that contains SSL client cipher
JkSESSIONIndicator - Name of the Apache environment that contains SSL session
JkKEYSIZEIndicator - Name of the Apache environment that contains SSL key size in use
JkExtractSSL - Turns on SSL processing and information gathering by mod_jk
JkOptions - Set one of more options to configure the mod_jk module
JkEnvVar - Adds a name of environment variable that should be sent to servlet-engine
JkWorkerProperty - Set workers.properties formated directive
- Current Configuration:
#加载mod_jk
LoadModule jk_module modules/mod_jk.so
#配置
<IfModule mod_jk.c>
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
</IfModule>
#文件类型匹配
<IfModule mod_jk.c>
JkMount /*.jsp loadbalancer #将所有的jsp请求交给loadbalancer[mod_jk的负JkMount /*.do loadbalancer
JkMount /servlet/* loadbalancer
</IfModule>
#设置默认索引页
DirectoryIndex index.jsp
http://tomcat.apache.org/connectors-doc/config/workers.html
The generic workers.properties directive is in the form:
worker.<worker name>.<directive>=<value>
Mandatory directives are the one that each worker must contain. Without them the worker will be unavailable or will misbehave.
type
ajp13
Apache JServ Protocol version 1.3 (hereafterajp13
ajp14
lb
jni
lb
jni).
AJP13 worker is the preferred worker type that JK uses for communication between web server and Tomcat. This type of worker uses sockets as communication channel. For detailed description of the AJP13 protocol stack browse to AJPv13 protocol specification
下面是对server.xml的说明:
Each workers.properties directive consists of three words separated by dot. The first word is always worker. The second word is the worker name that can be any name. The worker name reflects the name of the jvmRoute defined in Tomcat's server.xml configuration file.
The name of the worker can contain only the alphanumeric characters [a-z][A-Z][0-9] and is case insensitive.
Worker1 is index.jsp
<html>
<body bgcolor="red">
Session ID:<%=request.getSession().getId()%>
</body>
</html>
Worker2 is index.jsp
</html>
<html>
<body bgcolor="blue">
Session ID:<%=request.getSession().getId()%>
</body>
</html>
- tomcat和apache连接器mod_jk (tomcat connectors)
- tomcat和apache连接器mod_jk (Tomcat Connectors)
- linux apache和tomcat连接器mod_jk
- The Apache Tomcat Connectors
- apache+tomcat+mod_jk整合
- apache tomcat mod_jk
- apache tomcat 整合 (mod_jk)
- Apache mod_jk Tomcat集群
- docker apache + tomcat + mod_jk
- Linux 下Apache 和Tomcat 整合 mod_jk
- Linux 下Apache 和Tomcat 整合 mod_jk
- Linux 下Apache 和Tomcat 整合 mod_jk
- 自己动手编译mod_jk,Tomcat与JK连接器。
- 关于apache和tomcat的连接器
- mod_jk(Apache+mod_jk+tomcat)配置全攻略
- mod_jk(Apache+mod_jk+tomcat)详细配置方法
- mod_jk(Apache+mod_jk+tomcat)详细配置方法
- mod_jk(Apache+mod_jk+tomcat)详细配置方法
- ZOJ 3195(LCA模板)
- JVM指令集(指令码、助记符、功能描述)
- 树T1交换其(某些)左右节点的左右儿子变换成树T2,则是同构。给出一个多项式时间算法以决定是否两棵树同构
- zzu 10467: 控制食欲 --01背包
- 【CI学习笔记】引入jquery,以及文件夹结构的改变
- tomcat和apache连接器mod_jk (Tomcat Connectors)
- dubbo 运行时候找不到.ioc 文件
- Maple OpenMaple (API) 开发系列-1.0 概述
- js--ajax和跨域
- springmvc自定义拦截器
- 2. 块和布局,小部件
- HDOJ(HDU) 2107 Founding of HDU(找最大值)
- LightOJ 1341
- 3.主题