---
title: "apache+php+resin 环境中不能解析php文件的解决方法"
author: "berrywu"
date: "2010-05-05T09:35:36Z"
tags: []
categories: ["编程语言"]
slug: "apache-php-resin-php"
draft: false
lastmod: "2010-05-05T09:35:36Z"
id: 659253
url: "https://berrywu.iteye.com/blog/659253"
---

昨天公司的行情网站数据全部空白，跟踪了很久也没找到结果，原代码都没有改过，为什么以前用的好好的，突然就出错了呢，最终找到是服务器的原因，系统组的同事在Apache上又加入了resin，导致PHP文件被resin解析了。

报错为：

404 Not Found  
/test.php was not found on this server.  
\--------------------------------------------------------------------------------*  
Resin/3.1.3

 

解决办法:

 

通过修改resin的配置文件app-default.xml。  
注：文件位置在 $RESIN\_HOME/conf/，与主配置文件 resin.conf在同一目录。

如下，注释相关行即可:

&lt;!--  
&lt;servlet servlet-name="resin-php"  
servlet-class="com.caucho.quercus.servlet.QuercusServlet"&gt;  
&lt;/servlet&gt;  
\--&gt;

&lt;!--  
&lt;servlet-mapping url-pattern="\*.php" servlet-name="resin-php"/&gt;  
\--&gt;  
然后重启Apache，resin服务，发现php和jsp都能正常解析了。