Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2566334
  • 博文数量: 245
  • 博客积分: 4125
  • 博客等级: 上校
  • 技术积分: 3113
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-25 23:56
文章分类

全部博文(245)

文章存档

2015年(2)

2014年(26)

2013年(41)

2012年(40)

2011年(134)

2010年(2)

分类: 服务器与存储

2013-05-17 09:41:54

环境:
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

点击(此处)折叠或打开

  1. #
  2. # Virtual Hosts
  3. #
  4. # If you want to maintain multiple domains/hostnames on your
  5. # machine you can setup VirtualHost containers for them. Most configurations
  6. # use only name-based virtual hosts so the server doesn't need to worry about
  7. # IP addresses. This is indicated by the asterisks in the directives below.
  8. #
  9. # Please see the documentation at
  10. #
  11. # for further details before you try to setup virtual hosts.
  12. #
  13. # You may use the command line option '-S' to verify your virtual host
  14. # configuration.
  15. #
  16. # Use name-based virtual hosting.
  17. #
  18. NameVirtualHost *:8088
  19. #
  20. # VirtualHost example:
  21. # Almost any Apache directive may go into a VirtualHost container.
  22. # The first VirtualHost section is used for all requests that do not
  23. # match a ServerName or ServerAlias in any block.
  24. #
  25. #httpd.conf中apache Listen 8088端口
  26. #DocumentRoot apache资源文件目录
  27. #转发规则:ProxyPassMatch ^/admin/Easerver/(.*)$ ajp://localhost:8019/biz/$1
  28. #根据正则匹配 apache将(.*)$ 请求
  29. #通过tomcat_business(http端口:8081,ajp端口:8019)
  30. #通过ajp端口8019转发到(.*)
  31. #tomcat_business server.xml中配置 ajp端口
  32. #转发规则ProxyPass /admin ajp://localhost:8009/admin
  33. #将请求 通过tomcat_bas(http端口:8080,ajp端口:8019)
  34. #通过ajp端口8019转发到
  35. ServerAdmin webmaster@dummy-host.localhost
  36. DocumentRoot D:/temp
  37. ServerName localhost
  38. ProxyPassMatch ^/admin/Easerver/(.*)$ ajp://localhost:8019/biz/$1
  39. ProxyPass /admin ajp://localhost:8009/admin
  40. ServerAlias localhost
  41. ErrorLog "logs/dummy-host.localhost-error.log"
  42. CustomLog "logs/dummy-host.localhost-access.log" common
  43. Options -Indexes FollowSymLinks
  44. AllowOverride None
  45. Order allow,deny
  46. Allow from all

阅读(4704) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

CU博客助理2013-06-09 15:49:02

嘉宾点评:内容不多,却信息量足够用,也许这就是博客的魅力之一,无论分享给大家,还是作为自己日后参考的日志都不错的选择。不过,这篇博文应当是定位在有一定基础的IT人所需要的。
(感谢您参与“原创博文评选”获奖结果即将公布)