下载jk放到apache/modules下,修改apache/conf下配置文件httpd.conf
在末尾增加虚拟目录配置,加载jk配置;
整合IIS和apache,共用80端口冲突,修改iis端口,用apache作代理分发,去掉配置文件httpd。conf的四句代理注释,在末尾增加虚拟目录配置,重启tomcat,apache,即可用80端口访问asp,jsp,php网站
#apache代理。
LoadModule proxy_module modules/mod_proxy.so
#apache代理。启用proxy模块
LoadModule proxy_connect_module modules/mod_proxy_connect.so
#apache代理。启用proxy模块
LoadModule proxy_http_module modules/mod_proxy_http.so
#apache代理。启用proxy模块
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
# 整合tomcat,使根目录为tomcat的根目录
LoadModule jk_module modules/mod_jk.so
JkWorkersFile "D:\tomcat\conf\workers.properties"
<VirtualHost *:80>
ServerAdmin rabbit69@openria.com
ServerName localhost
DirectoryIndex index.html index.htm index.jsp
JkMount /* ajp13
JkAutoAlias "D:\tomcat\webapps"
<Directory "D:\tomcat\webapps">
Options Indexes FollowSymLinks
allow from all
</Directory>
</VirtualHost>
#整合iis,tomcat
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin rabbit69@openria.cn
ServerName localhost
DocumentRoot "D:\tomcat\webapps\ROOT"
DirectoryIndex index.asp default.asp index.html index.htm
Alias /test "C:/Inetpub/wwwroot"
<Directory "C:/Inetpub/wwwroot">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyPass / http://127.0.0.1:800/
ProxyPassReverse / http://127.0.0.1:800/
</VirtualHost>