Apache、Tomcat、mod_jk 域名解析
1、安装Tomcat
2、安装Apache
3、下载Mod_JK,并放放apache的modules 目录中
4、修改httpd.conf,添加配置文件支持:
写道
#JKModel
LoadModule jk_module modules/mod_jk-apache-2.2.4.so
JkWorkersFile conf/extra/jkworker.properties
LoadModule jk_module modules/mod_jk-apache-2.2.4.so
JkWorkersFile conf/extra/jkworker.properties
创建conf/extra/jkworker.properties,内容如下:
写道
workers.tomcat_home=D:\Servers\apache-tomcat-6.0.32
workers.java_home=C:\Java\jdk1.6.0_27
worker.list=book
worker.book.port=8109
worker.book.host=localhost
worker.book.type=ajp13
worker.book.lbfactor=1
workers.java_home=C:\Java\jdk1.6.0_27
worker.list=book
worker.book.port=8109
worker.book.host=localhost
worker.book.type=ajp13
worker.book.lbfactor=1
5、创建虚拟主机:
写道
<VirtualHost *:80>
ServerName test.sjzmsg.cn
DocumentRoot D:/Servers/apache-tomcat-6.0.32/booking/ROOT
JkMount /* book
</VirtualHost>
ServerName test.sjzmsg.cn
DocumentRoot D:/Servers/apache-tomcat-6.0.32/booking/ROOT
JkMount /* book
</VirtualHost>
6、修改tomcat配置文件:server.xml:添加虚拟主机:
写道
<Host name="test.sjzmsg.cn" appBase="booking"
unpackWARs="false" autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
unpackWARs="false" autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">
</Host>