<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DBAlife &#187; resin</title>
	<atom:link href="http://www.dbalife.com/archives/tag/resin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dbalife.com</link>
	<description>星光照耀前方</description>
	<lastBuildDate>Tue, 10 Aug 2010 03:34:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>caucho-request的范围</title>
		<link>http://www.dbalife.com/archives/200.html</link>
		<comments>http://www.dbalife.com/archives/200.html#comments</comments>
		<pubDate>Tue, 16 Dec 2008 08:20:31 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[addhandler]]></category>
		<category><![CDATA[caucho-request]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[resin]]></category>
		<category><![CDATA[sethandler]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/archives/200.html</guid>
		<description><![CDATA[在为Apache+Resin环境添加php支持的时候，php编译安装一切顺利，但是apache不能解析php页面。 发现有这样一些现象： 在任意一个404页面中，服务器信息仅显示Resin，而没有Apache 注释掉httpd.conf中的Resin条目，php可以被解析 说明apache将任意请求都发送给了Resin，而这个resin3.0不能解析php 检查httpd.conf，将SetHandler caucho-request注释掉，重启apache，php解析正常。 当前的httpd.conf中resin部分： LoadModule caucho_module /opt/apache/modules/mod_caucho.so ResinConfigServer localhost 6802 CauchoConfigCacheDirectory /tmp AddHandler caucho-request jsp 在Resin非常模糊的联机文档中提到了caucho-request "caucho-request&#160; Dispatch a request to Resin" 而在给出的例子中 &#60;Location /foo/*&#62; &#160;&#160; SetHandler caucho-request &#60;/Location&#62; 将caucho-request的范围限定在/foo/ Blogged with the Flock Browser Tags: resin, caucho-request, addhandler, sethandler, php, jsp Related posts:Apache2与Resin2整合虚拟主机的配置 resin的优化 linux php 扩展库编译——添加cURL模块


Related posts:<ol><li><a href='http://www.dbalife.com/archives/126.html' rel='bookmark' title='Permanent Link: Apache2与Resin2整合虚拟主机的配置'>Apache2与Resin2整合虚拟主机的配置</a></li>
<li><a href='http://www.dbalife.com/archives/7.html' rel='bookmark' title='Permanent Link: resin的优化'>resin的优化</a></li>
<li><a href='http://www.dbalife.com/archives/109.html' rel='bookmark' title='Permanent Link: linux php 扩展库编译——添加cURL模块'>linux php 扩展库编译——添加cURL模块</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>在为Apache+Resin环境添加php支持的时候，php编译安装一切顺利，但是apache不能解析php页面。</p>
<p>发现有这样一些现象：</p>
<ul>
<li>在任意一个404页面中，服务器信息仅显示Resin，而没有Apache</li>
<li>注释掉httpd.conf中的Resin条目，php可以被解析</li>
</ul>
<p>说明apache将任意请求都发送给了Resin，而这个resin3.0不能解析php</p>
<p>检查httpd.conf，将SetHandler caucho-request注释掉，重启apache，php解析正常。</p>
<p>当前的httpd.conf中resin部分：</p>
<div style="margin-left: 40px;">LoadModule caucho_module /opt/apache/modules/mod_caucho.so<br />
ResinConfigServer localhost 6802<br />
CauchoConfigCacheDirectory /tmp<br />
AddHandler caucho-request jsp
</div>
<p>在Resin非常模糊的联机文档中提到了caucho-request</p>
<div style="margin-left: 40px;">"caucho-request&nbsp; Dispatch a request to Resin"
</div>
<p>而在给出的例子中</p>
<div style="margin-left: 40px;">&lt;Location /foo/*&gt;<br />
&nbsp;&nbsp;  SetHandler caucho-request<br />
&lt;/Location&gt;
</div>
<p>将caucho-request的范围限定在/foo/</p>
<div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;">Blogged with the <a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser">Flock Browser</a></div>
<p><!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/resin" rel="tag">resin</a>, <a href="http://technorati.com/tag/caucho-request" rel="tag">caucho-request</a>, <a href="http://technorati.com/tag/addhandler" rel="tag">addhandler</a>, <a href="http://technorati.com/tag/sethandler" rel="tag">sethandler</a>, <a href="http://technorati.com/tag/php" rel="tag">php</a>, <a href="http://technorati.com/tag/jsp" rel="tag">jsp</a></p>
<p><!-- technorati tags end --></p>


<p>Related posts:<ol><li><a href='http://www.dbalife.com/archives/126.html' rel='bookmark' title='Permanent Link: Apache2与Resin2整合虚拟主机的配置'>Apache2与Resin2整合虚拟主机的配置</a></li>
<li><a href='http://www.dbalife.com/archives/7.html' rel='bookmark' title='Permanent Link: resin的优化'>resin的优化</a></li>
<li><a href='http://www.dbalife.com/archives/109.html' rel='bookmark' title='Permanent Link: linux php 扩展库编译——添加cURL模块'>linux php 扩展库编译——添加cURL模块</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/200.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>resin2升级为resin3后遇到的jsp显示问题</title>
		<link>http://www.dbalife.com/archives/189.html</link>
		<comments>http://www.dbalife.com/archives/189.html#comments</comments>
		<pubDate>Mon, 27 Oct 2008 09:36:22 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[jstl]]></category>
		<category><![CDATA[resin]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=189</guid>
		<description><![CDATA[将系统由resin 2.1.17升级为resin 3.0.25后，发现大部分JSP不能正常显示，错误都类似： Caused by: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${user.ID}": Unable to find a value for "ID" in object of class "java.lang.String" using operator "." (null) 这是resin3与jstl的问题，需要将resin自带的jstl1.1禁用。 方法如下 ： 将resin的conf文件中： &#60;servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"/&#62; 修改为： &#60;servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"&#62;     &#60;init enable="false"/&#62; &#60;/servlet&#62; 在resin的webapp配置中,添加一个&#60;jsp&#62;标签 &#60;web-app id="/test" document-directory="webapps/test"&#62;     &#60;jsp [...]


Related posts:<ol><li><a href='http://www.dbalife.com/archives/82.html' rel='bookmark' title='Permanent Link: ubuntu7.10 JDK手动安装'>ubuntu7.10 JDK手动安装</a></li>
<li><a href='http://www.dbalife.com/archives/200.html' rel='bookmark' title='Permanent Link: caucho-request的范围'>caucho-request的范围</a></li>
<li><a href='http://www.dbalife.com/archives/126.html' rel='bookmark' title='Permanent Link: Apache2与Resin2整合虚拟主机的配置'>Apache2与Resin2整合虚拟主机的配置</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>将系统由resin 2.1.17升级为resin 3.0.25后，发现大部分JSP不能正常显示，错误都类似：</p>
<p>Caused by: javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${user.ID}": Unable to find a value for "ID" in object of class "java.lang.String" using operator "." (null)</p>
<p>这是resin3与jstl的问题，需要将resin自带的jstl1.1禁用。</p>
<p>方法如下 ：<br />
将resin的conf文件中：<br />
&lt;servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"/&gt;<br />
修改为：<br />
&lt;servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"&gt;<br />
    &lt;init enable="false"/&gt;<br />
&lt;/servlet&gt;</p>
<p>在resin的webapp配置中,添加一个&lt;jsp&gt;标签<br />
&lt;web-app id="/test" document-directory="webapps/test"&gt;<br />
    &lt;jsp fast-jstl="false"/&gt;      <br />
&lt;/web-app&gt;</p>
<p>最后，将JSP文件中<br />
&lt;%@ taglib prefix=’c’ uri=’http://java.sun.com/jstl/core’ %&gt; <br />
修改为<br />
&lt;%@ taglib prefix=’c’ uri=’http://java.sun.com/jsp/jstl/core’ %&gt; </p>
<p>现在JSP可以正常显示了</p>


<p>Related posts:<ol><li><a href='http://www.dbalife.com/archives/82.html' rel='bookmark' title='Permanent Link: ubuntu7.10 JDK手动安装'>ubuntu7.10 JDK手动安装</a></li>
<li><a href='http://www.dbalife.com/archives/200.html' rel='bookmark' title='Permanent Link: caucho-request的范围'>caucho-request的范围</a></li>
<li><a href='http://www.dbalife.com/archives/126.html' rel='bookmark' title='Permanent Link: Apache2与Resin2整合虚拟主机的配置'>Apache2与Resin2整合虚拟主机的配置</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/189.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2与Resin2整合虚拟主机的配置</title>
		<link>http://www.dbalife.com/archives/126.html</link>
		<comments>http://www.dbalife.com/archives/126.html#comments</comments>
		<pubDate>Wed, 28 May 2008 03:31:30 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[resin]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=126</guid>
		<description><![CDATA[Apache＋Resin是许多网站采用的架构，Apache在前，Resin在后，可以实现负载均衡、解析各类应用及高扩展性等多种强大的功能。Apache的文档很多，但是涉及到Resin的资料比较少。最好的参考，依然是2者附带的官方文档，Resin中关联apache的部分讲的不够详细，许多细节依然需要自己多做测试，才可以找到合适的方法解决问题。 这里是一个Apache和Resin整合搭建虚拟主机的例子，版本号分别为Apache2.2.8和Resin2.1.17。 通过编译将Apache和Resin整合的资料很多，不再赘述。编译完成后Resin会在Apache的httpd.conf中添加2行 LoadModule caucho_module /opt/apache-2.2.8/modules/mod_caucho.so CauchoHost localhost 6802 如果要用Resin来解析jsp文件，需要添加 AddHandler caucho-request jsp SetHandler caucho-request Apache的配置 在httpd.conf中，首先加入 NameVirtualHost *:80 然后可以添加虚拟主机的配置段 &#60;VirtualHost *:80&#62; ServerAdmin wm@dbalife.com DocumentRoot /opt/resin-2.1.17/webapps ServerName vhost1.dbalife.com CauchoConfigFile /opt/resin-2.1.17/conf/vhost1.conf ErrorLog logs/ip-error_log TransferLog logs/ip-access_log &#60;/VirtualHost&#62; 与Apache单配虚拟主机差不多，多出一个字段CauchoConfigFile来指定这个虚拟主机的Resin配置文件。注意&#60;Virtualhost&#62;标签必须写在LoadModule caucho_module等Resin整合信息之后，以使Apache正确识别Virtualhost中的Resin相关字段。 Resin的配置 在CauchoConfigFile指定的配置文件vhost1.conf中，最简化只需要写入这样几句： &#60;caucho.com&#62; &#60;http-server&#62; &#60;srun host=localhost port=6802/&#62; &#60;host id='vhost1.dbalife.com'&#62; &#60;app-dir&#62;/opt/resin-2.1.17/webapps/vhost1&#60;/app-dir&#62; &#60;/host&#62; &#60;/http-server&#62; &#60;/caucho.com&#62; 即几个Resin配置文件的核心标签： &#60;caucho.con&#62;声明 &#60;http-server&#62;http服务段 &#60;srun&#62;进程通讯 &#60;host&#62;(虚拟)主机段 [...]


Related posts:<ol><li><a href='http://www.dbalife.com/archives/7.html' rel='bookmark' title='Permanent Link: resin的优化'>resin的优化</a></li>
<li><a href='http://www.dbalife.com/archives/200.html' rel='bookmark' title='Permanent Link: caucho-request的范围'>caucho-request的范围</a></li>
<li><a href='http://www.dbalife.com/archives/327.html' rel='bookmark' title='Permanent Link: vmware server 2.0 安装要点'>vmware server 2.0 安装要点</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Apache＋Resin是许多网站采用的架构，Apache在前，Resin在后，可以实现负载均衡、解析各类应用及高扩展性等多种强大的功能。Apache的文档很多，但是涉及到Resin的资料比较少。最好的参考，依然是2者附带的官方文档，Resin中关联apache的部分讲的不够详细，许多细节依然需要自己多做测试，才可以找到合适的方法解决问题。</p>
<p>这里是一个Apache和Resin整合搭建虚拟主机的例子，版本号分别为Apache2.2.8和Resin2.1.17。</p>
<p>通过编译将Apache和Resin整合的资料很多，不再赘述。编译完成后Resin会在Apache的httpd.conf中添加2行</p>
<blockquote><p>LoadModule caucho_module /opt/apache-2.2.8/modules/mod_caucho.so<br />
CauchoHost localhost 6802</p></blockquote>
<p>如果要用Resin来解析jsp文件，需要添加</p>
<blockquote><p>AddHandler caucho-request jsp<br />
SetHandler caucho-request</p></blockquote>
<h3>Apache的配置</h3>
<p>在httpd.conf中，首先加入</p>
<blockquote><p>NameVirtualHost *:80</p></blockquote>
<p>然后可以添加虚拟主机的配置段</p>
<blockquote><p>&lt;VirtualHost *:80&gt;<br />
ServerAdmin wm@dbalife.com<br />
DocumentRoot /opt/resin-2.1.17/webapps<br />
ServerName vhost1.dbalife.com<br />
CauchoConfigFile /opt/resin-2.1.17/conf/vhost1.conf<br />
ErrorLog logs/ip-error_log<br />
TransferLog logs/ip-access_log<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>与Apache单配虚拟主机差不多，多出一个字段CauchoConfigFile来指定这个虚拟主机的Resin配置文件。注意&lt;Virtualhost&gt;标签必须写在LoadModule caucho_module等Resin整合信息之后，以使Apache正确识别Virtualhost中的Resin相关字段。</p>
<h3>Resin的配置</h3>
<p>在CauchoConfigFile指定的配置文件vhost1.conf中，最简化只需要写入这样几句：</p>
<blockquote><p>&lt;caucho.com&gt;<br />
&lt;http-server&gt;<br />
&lt;srun host=localhost port=6802/&gt;<br />
&lt;host id='vhost1.dbalife.com'&gt;<br />
&lt;app-dir&gt;/opt/resin-2.1.17/webapps/vhost1&lt;/app-dir&gt;<br />
&lt;/host&gt;<br />
&lt;/http-server&gt;<br />
&lt;/caucho.com&gt;</p></blockquote>
<p>即几个Resin配置文件的核心标签：</p>
<ul>
<li>&lt;caucho.con&gt;声明</li>
<li>&lt;http-server&gt;http服务段</li>
<li>&lt;srun&gt;进程通讯</li>
<li>&lt;host&gt;(虚拟)主机段</li>
<li>&lt;app-dir&gt;应用发布路径</li>
</ul>
<p>如果配置多个虚拟主机，srun中的port需要指定<span style="color: #ff0000;">不同的端口号</span>，否则Resin启动会发生冲突。</p>
<p>至此简单的虚拟主机已经设定完毕.</p>
<p>启动虚拟主机：</p>
<blockquote><p><em>/opt/resin-2.1.17/bin/httpd.sh  -conf /opt/resin-2.1.17/conf/vhost1.conf -pid /opt/resin-2.1.17/conf/vhost1.pid start</em></p></blockquote>
<p>关闭虚拟主机:</p>
<blockquote><p><em>/opt/resin-2.1.17/bin/httpd.sh  -conf /opt/resin-2.1.17/conf/vhost1.conf -pid /opt/resin-2.1.17/conf/vhost1.pid stop</em></p></blockquote>
<p>对Resin应用的个性化需求，上面简单的配置文件不能满足需求。我们可以用&lt;resin:include&gt;标签来扩展配置文件。这里是一个完整的例子：</p>
<blockquote><p>&lt;caucho.com&gt;<br />
&lt;resin:include href='common_caucho.conf'/&gt;<br />
&lt;http-server&gt;<br />
&lt;srun host=localhost port=6802/&gt;<br />
&lt;resin:include href='common_httpserver.conf'/&gt;<br />
&lt;host id='vhost1.dbalife.com'&gt;<br />
&lt;app-dir&gt;/opt/resin-2.1.17/webapps/vhost1&lt;/app-dir&gt;<br />
&lt;resin:include href='common_host.conf'/&gt;<br />
&lt;/host&gt;<br />
&lt;/http-server&gt;<br />
&lt;/caucho.com&gt;</p></blockquote>
<p>在这个文件中，通过引入common_caucho.conf、common_httpserver.conf和common_host.conf，对&lt;caucho&gt;&lt;http-server&gt;&lt;host&gt;3个标签的内容进行丰富，最终形成一个完整的Resin配置文件，多个虚拟主机可以通过这种方式共享相同配置参数。</p>
<p>－EOF－</p>


<p>Related posts:<ol><li><a href='http://www.dbalife.com/archives/7.html' rel='bookmark' title='Permanent Link: resin的优化'>resin的优化</a></li>
<li><a href='http://www.dbalife.com/archives/200.html' rel='bookmark' title='Permanent Link: caucho-request的范围'>caucho-request的范围</a></li>
<li><a href='http://www.dbalife.com/archives/327.html' rel='bookmark' title='Permanent Link: vmware server 2.0 安装要点'>vmware server 2.0 安装要点</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/126.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
