在ubuntu上整合apache http server tomcat

在ubuntu下整合apache http server tomcat

安装apache2 tomcat6 libapache2-mod-jk

注意,尽量用源安装,保证版本一直。

sun jdk安装需要加载其他源。

在 httpd.conf文件添加

ServerName 127.0.0.1

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

# Where to find workers.properties

JkWorkersFile /***/workers.properties  # 注意 路径

# Where to put jk logs

JkLogFile /tmp/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”

在其他目录创建 workers.properties 注意 路径

workers.tomcat_home=/opt/servers/tomcat5.5

workers.java_home=/opt/java/jdk1.5

ps=/

worker.list=worker1

worker.worker1.port=8009

worker.worker1.host=localhost

worker.worker1.type=ajp13

worker.worker1.lbfactor=1

在/etc/apache2/sites-available/default

jkMount /* worker1

jkMount / worker1

重启

sudo /etc/init.d/apache2 reload

sudo /etc/init.d/apache2 restart

注意:

tomcat6中,serverx.xml 里面代8009那句,打开注释。

在ubuntu上整合apache http server tomcat

相关文章:

你感兴趣的文章:

标签云: