apache+resin集群配置,将指定接口的请求(servlet)转到特定resin的配置

作者: 2hei 发表于2009年5月 6日 12:52
版权声明: 可以转载, 转载时务必以超链形式标明文章原始出处和作者信息及版权声明
http://www.2hei.net/mt/2009/05/apache-resin-servlet-to-the-rightone.html
apache+resin集群配置,将指定接口的请求(servlet)转到特定resin的配置。
需求如下:将某个特定url的请求转到特定的后台resin服务器上,其余的请求仍然保持cluster状态

resin2的配置
httpd.conf
<IfModule mod_caucho.c>
  <Location /MyServlet*>
    CauchoConfigFile conf/resin-test.conf
  </Location>
  CauchoConfigFile conf/resin-all.conf
</IfModule>

resin-test.conf
<caucho.com>
  <http-server>
    <srun host='192.168.1.100' port='6800'/>
    <servlet-mapping url-pattern='/MyServlet/*' servlet-name='invoker'/>
  </http-server>
</caucho.com>

resin-all.conf
<caucho.com>
  <http-server>
    <srun host='192.168.1.100' port='6800'/>
    <srun host='192.168.1.101' port='6800'/>
    <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
    <servlet-mapping url-pattern='*.jsp' servlet-name='com.caucho.jsp.JspServlet'/>
  </http-server>
</caucho.com>

resin3的配置,相对resin2简单一些,只要在apache中做如下配置:
httpd.conf
<Location /MyServlet* >
  ResinConfigServer 192.168.1.100 6800
</Location>

ResinConfigServer 192.168.1.100 6800
ResinConfigServer 192.168.1.101 6800
| | Comments (0) | TrackBacks (0)

发表一个评论

关于这篇文章

这篇文章由2hei2009年5月 6日 12:52发布.

上一篇:xp系统中NTFS文件经过EFS加密

下一篇:python的abc

回到首页 或者查看归档文章

  • Powered by FeedBurner
  • Add to Google Reader or Homepage
  • Add to My AOL
  • Subscribe in NewsGator Online
  • del.icio.us/2heidel.icio.us/2hei
  • Subscribe to feed feeds