http://tomcat.apache.org/connectors-doc/generic_howto/quick.html
搭建最简单的tomcat connector
用到了apapche 的mod_jk 模块 。
一个最小化的workers.properties文件
# Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009
就是后端的一个tomcat的一些信息。
这个文件放在/etc/httpd/conf.d下
# Load mod_jk module # Update this path to match your modules location LoadModule jk_module libexec/mod_jk.so # Declare the module for <IfModule directive> (remove this line on Apache 2.x) AddModule mod_jk.c # Where to find workers.properties # Update this path to match your conf directory location (put workers.properties next to httpd.conf) JkWorkersFile /etc/httpd/conf/workers.properties # Where to put jk shared memory # Update this path to match your local state directory or logs directory JkShmFile /var/log/httpd/mod_jk.shm # Where to put jk logs # Update this path to match your logs directory location (put mod_jk.log next to access_log) JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # Select the timestamp log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # Send everything for context /examples to worker named worker1 (ajp13) JkMount /examples/* worker1
新建一个vhost
<VirtualHost 115.28.1xx.xx:80>
DocumentRoot /opt/tomcat8080/webapps
ServerName 115.28.xx
JkMount /examples/* worker1
#JkMount /servlet/* ajp13
</VirtualHost>
The Apache Tomcat Connector,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/gqdw/p/3785812.html