1.所需软件:
jdk-1_5_0_09-windows-i586-p.exe
apache-tomcat-5.5.20-admin.zip
apache_2.0.59-win32-x86-no_ssl.msi
mod_jk-apache-2.0.59.so
mysql-connector-java-3.1.14.zip
php-5.2.1-Win32.zip
apache tomcat jdk安装省略。
2.apache支持php加载模块
LoadModule php5_module c:/php/php5apache2.dll
添加映射类型
AddType application/x-httpd-php .php
3.apche与tomcat整合
a.在Apache的配置文件httpd.conf里加入:
LoadModule jk_module modules/mod_jk-apache-2.0.59.so
JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JkMount /*.do ajp13
JkMount /*.action ajp13
b.在tomcat的conf目录下,新建一个workers.properties文件,内容如下:
#指定Tomcat的主目录以及JDK
workers.tomcat_home=d:\Tomcat
workers.java_home= c:\java\jdk
ps=\
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
4.tomcat中虚拟站点
在tomcat的server.xml中配置
文章评论