Apache與resin整合出現的問題
我的Apache是2.0.48,resin是3.0.8
Apache Listen 80埠,resin Listen 8081埠,
resin的配置
<!-- define the servers in the cluster -->
<server id="" address="127.0.0.1" port="6802"/>
.
.
.
<host id="" root-directory=".">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id="/" root-directory="/var/www/html"/>
<web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
<!--
- Administration application /resin-admin
-->
<prologue>
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>
</prologue>
</web-app>
</host>
Apache 中添加如下配置:
#
# mod_caucho Resin Configuration
#
LoadModule caucho_module /usr/lib64/httpd/modules/mod_caucho.so
<IfModule mod_caucho.c>
ResinConfigServer localhost 6802
CauchoConfigCacheDirectory /tmp
CauchoStatus yes
AddHandler caucho-request .action
AddHandler caucho-request jsp
<Location /servlet/*>
SetHandler caucho-request
</Location>
</IfModule>
結果我在IE中打開 http://localhost 顯示的是Apache的默認頁面,Apache可以工作
打開 http://localhost:8081,顯示的也是Apache的默認頁面,說明resin的文檔路徑設置也正確,
打開 http;//localhost:8081/test.jsp 可以正常工作,說明resin本身是可以工作的,也沒有問題
可是,打開 http://localhost/test.jsp時能正常顯示jsp頁面,但php頁面卻不能正常的顯示,而是顯示下面那樣
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
出現這樣的問題,是不是所有的請求包括php的請求都傳給resin那裡處理了,所以導致php不能正常顯示???
當我把httpd.conf配置文件的
ResinConfigServer localhost 6802
這句註釋掉,又能正常使用php了,但這樣做就意味著不能同時使用jsp.
請問那位大哥知道是怎麼回事?該怎麼解決?
[ 本帖最後由 tomzhi 於 2008-11-17 15:11 編輯 ]
《解決方案》
此問題已經得到解決
之所以出現這樣的問題確實是發現PHP文件都被resin接管來解析了,就出現了錯誤。
解決方法是:
可以通過修改resin的配置文件app-default.xml來解決。
如下所示註釋相關行:
<!--
<servlet servlet-name="resin-php"
servlet-class="com.caucho.quercus.servlet.QuercusServlet">
</servlet>
-->
<!--
<servlet-mapping url-pattern="*.php" servlet-name="resin-php"/>
-->
然後重啟Apache伺服器就恢復了正常。
《解決方案》
很好。很強大啊。
學習了。