一.安装appache
1.http://apache.freelamp.com/httpd/ 下载2.0.63版本;
2.解压到/opt/
3.命令行:cd /opt/httpd-2.0.63
./configure --prefix=/opt/httpd --enable-module=so --enable-mods-shared=all
make
make install
二.配置:
1.http://www.apache.org/dist/tomcat/tomcat- connectors/jk/binaries/linux/jk-1.2.28/i586/
下载mod_jk-1.2.28-httpd-2.0.X.so ;
2 . 将mod_jk-1.2.28-httpd-2.0.X.so 放到/opt/httpd/modules/,并改名为"mod_jk.so";
3. 在/opt/httpd/conf下创建mod_jk.conf和workers.properties文件;
4.修改文件里的路径
5.修改/opt/httpd/conf/httpd.conf
ServerName LocalHost:80
http://centos.candishosting.com.cn/5.3/os/i386/CentOS/ rpm包
三.mod_jk.conf和workers.properties文件内容
1.workers.properties内容:
ps=/
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13//此处与tomcat server.xml有关
worker.worker1.connection_pool_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.lbfactor=1
2.mod_jk.conf内容:
# 指出mod_jk模块工作所需要的工作文件workers.properties的位置
JkWorkersFile /opt/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /opt/httpd/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# 将所有servlet 和jsp请求通过ajp13的协议送给Tomcat,让Tomcat来处理
JkMount /*/servlet/* worker1
JkMount /*.jsp worker1
JkMount /* worker1
1.http://apache.freelamp.com/httpd/ 下载2.0.63版本;
2.解压到/opt/
3.命令行:cd /opt/httpd-2.0.63
./configure --prefix=/opt/httpd --enable-module=so --enable-mods-shared=all
make
make install
二.配置:
1.http://www.apache.org/dist/tomcat/tomcat- connectors/jk/binaries/linux/jk-1.2.28/i586/
下载mod_jk-1.2.28-httpd-2.0.X.so ;
2 . 将mod_jk-1.2.28-httpd-2.0.X.so 放到/opt/httpd/modules/,并改名为"mod_jk.so";
3. 在/opt/httpd/conf下创建mod_jk.conf和workers.properties文件;
4.修改文件里的路径
5.修改/opt/httpd/conf/httpd.conf
ServerName LocalHost:80
http://centos.candishosting.com.cn/5.3/os/i386/CentOS/ rpm包
三.mod_jk.conf和workers.properties文件内容
1.workers.properties内容:
ps=/
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13//此处与tomcat server.xml有关
worker.worker1.connection_pool_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.lbfactor=1
2.mod_jk.conf内容:
# 指出mod_jk模块工作所需要的工作文件workers.properties的位置
JkWorkersFile /opt/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /opt/httpd/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# 将所有servlet 和jsp请求通过ajp13的协议送给Tomcat,让Tomcat来处理
JkMount /*/servlet/* worker1
JkMount /*.jsp worker1
JkMount /* worker1