环境:
apache(httpd)运行在localhost 8088端口
tomcat_bas(tomcat 6的一个实例)
(http端口:8080,ajp端口:8019)运行在localhost 8080端口,部署service.war
tomcat_business(tomcat 6的一个实例)
(http端口:8081,ajp端口:8019)运行在localhost 8081端口,部署业务系统biz.war
以下是转发规则:
httpd-vhost.conf
-
#
-
# Virtual Hosts
-
#
-
# If you want to maintain multiple domains/hostnames on your
-
# machine you can setup VirtualHost containers for them. Most configurations
-
# use only name-based virtual hosts so the server doesn't need to worry about
-
# IP addresses. This is indicated by the asterisks in the directives below.
-
#
-
# Please see the documentation at
-
#
-
# for further details before you try to setup virtual hosts.
-
#
-
# You may use the command line option '-S' to verify your virtual host
-
# configuration.
-
-
#
-
# Use name-based virtual hosting.
-
#
-
NameVirtualHost *:8088
-
#
-
# VirtualHost example:
-
# Almost any Apache directive may go into a VirtualHost container.
-
# The first VirtualHost section is used for all requests that do not
-
# match a ServerName or ServerAlias in any block.
-
#
-
#httpd.conf中apache Listen 8088端口
-
#DocumentRoot apache资源文件目录
-
-
#转发规则:ProxyPassMatch ^/admin/Easerver/(.*)$ ajp://localhost:8019/biz/$1
-
#根据正则匹配 apache将(.*)$ 请求
-
#通过tomcat_business(http端口:8081,ajp端口:8019)
-
#通过ajp端口8019转发到(.*)
-
#tomcat_business server.xml中配置 ajp端口
-
-
#转发规则ProxyPass /admin ajp://localhost:8009/admin
-
#将请求 通过tomcat_bas(http端口:8080,ajp端口:8019)
-
#通过ajp端口8019转发到
-
-
ServerAdmin webmaster@dummy-host.localhost
-
DocumentRoot D:/temp
-
ServerName localhost
-
ProxyPassMatch ^/admin/Easerver/(.*)$ ajp://localhost:8019/biz/$1
-
ProxyPass /admin ajp://localhost:8009/admin
-
ServerAlias localhost
-
ErrorLog "logs/dummy-host.localhost-error.log"
-
CustomLog "logs/dummy-host.localhost-access.log" common
-
-
-
Options -Indexes FollowSymLinks
-
AllowOverride None
-
Order allow,deny
-
Allow from all
-
-
-
阅读(4704) | 评论(1) | 转发(0) |