Resin与Apache的故事

 
Virtual Hosts with Apache or IIS

A common configuration uses virtual hosts with Apache or IIS. As usual, Apache or IIS will pass matching requests to Resin.

Apache

The Resin JVM configuration with Apache is identical to the standalone configuration. That similarity makes it easy to debug the Apache configuration by retreating to Resin standalone if needed.

The ServerName directive in Apache is vital to make Resin's virtual hosting work. When Apache passes the request to Resin, it tells Resin theServerName. Without the ServerName, Resin can get very confused which host to serve.

httpd.conf
LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so

ResinConfigServer localhost 6802

<VirtualHost 127.0.0.1>
  ServerName gryffindor.caucho.com
</VirtualHost>

<VirtualHost 192.168.0.1>
  ServerName slytherin.caucho.com
</VirtualHost>

Note: You'll the LoadModule must appear before the ResinConfigServer for Apache to properly understand the ResinConfigServer command. If they're missing, Apache will send an error.

记得要在apache里配置ServiceName哦。不然Resin不知道选择哪个应用响应request的。未完,待续

 

如果一个Resin有多个工程。如果前面的工程不能启动,那么后面的工程也就不能启动。跟Tomcat一样的。

今天在调试的时候,发现项目一直启动不起来,在启动完memcached的时候,就一直停在哪里不动了。重新启动几次也检查了配置文件。都发现没有问题。然后想了想

原来有一个前面的项目是需要启动MQ的,但是我没有启动。所以启动了memcached后就停止不动了(不像tomcat,直接报错)。于是,我把resin.conf中的那个工程

也就是virtual host 给注释了。重新启动Resin。访问项目。成功了。顺带一下,Resin的文档写得很详细。一般英文的人都能看懂。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值