LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 771|回复: 2

向大家请教Resin+Apache

[复制链接]
发表于 2004-6-23 06:39:18 | 显示全部楼层 |阅读模式
:help Resin+Apache :help

我在redhat9下单独安装了Apache-httpd-2.0.49.tar.gz,测试等一切正常
然后看了网上的一篇帖子介绍如何整合Resin和Apache,就按照所讲的下载了resin-2.1.13-src.tar.gz和resin-2.1.13.tar.gz。解开resin-2.1.13.tar.gz后好像不用编译
# httpd.sh start
直接可以http://……:8080访问到我 ... resin的界面。
但是然后按帖子所讲的,再解开resin-2.1.13-src.tar.gz,
# ./configure --with-apxs=/opt/apache/bin/apxs
(我的apache装在/opt/apache目录下)
然后再
# make时就报了2个错,进行不下去了……

按照它所讲,还要修改/opt/resin/resin-2.1.13/conf/resin.conf

<http-server>   
<!--      
- The root file directory of the server.  Apache users will change      
- this to /usr/local/apache/htdocs and IIS users will change it      
- to d:\inetpub\wwwroot      
-->   
<doc-dir>/opt/apache/htdocs/</doc-dir>      
<!-- the http port -->  
这段将doc-dir改成自己的doc dir,我这里是/opt/apache/htdocs/

再去修改httpd.conf
加入

LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so  
AddModule mod_caucho.c   
<IfModule mod_caucho.c>      
CauchoConfigFile /usr/local/resin-2.1.4/conf/resin.conf  
<Location /caucho-status>  
SetHandler caucho-status  
</Location>  
</IfModule>
加在最后


改过后,重启resin没事,但是apache就起动不了了,

# /opt/apache/bin/apachectl restart会报如下错:
Syntax error on line 1052 of /opt/apache/conf/httpd.conf:
Cannot load /opt/apache/libexec/mod_caucho.so into server: /opt/apache/libexec/mod_caucho.so: cannot open shared object file: No such file or directory


再用其他主机测试,http://……:8080/,访到的页面是“Directory of /”开头的非正常显示的apache页面。

到底该怎么改好它呢?

另外好像各位老大们在精华区里讲到resin不多,希望有哪位英雄给我讲讲Resin和Apache整合的操作,实在是很急啊……
或者能提供好的教程也行啊,谢了

再次谢谢了!:thank :thank :thank
 楼主| 发表于 2004-6-23 06:42:01 | 显示全部楼层
讲解resin的原贴如下:
烦请大家给看看,是它有什么问题,还是我的哪一步做错了???

编译apache时候必须加入了DSO支持,如果没有,请加入 --enable-module=so 选项重新编译apache
安装resin:
下载resin的安装包


/usr/local
# tar -zxvf resin-2.1.4.tar.gz  
/usr/local
# cd resin-2.1.4/bin  
/usr/local/resin-2.1.4/bin
# httpd.sh start

如果没有错误消息
看一下http://ip:8080/
能看到resin的页面就表示单独运行resin成功了

下面是比较重要的整合resin和apache
首先编译mod_caucho
下载resin的源代码

/usr/local# tar -zxvf resin-2.1.4-src.tar.gz  /usr/local
# cd resin-2.1.4-src  /usr/local/resin-2.1.4-src
# ./configure --with-apxs=/usr/local/apache/bin/apxs  或者  /usr/local/resin-2.1.4-src
# ./configure --with-apxs=/usr/local/apache  /usr/local/apache为apache的安装路径  然后  /usr/local/resin-2.1.4-src
# make  
# make install


修改resin-2.1.4/conf/resin.conf

<http-server>   
<!--      
- The root file directory of the server.  Apache users will change      
- this to /usr/local/apache/htdocs and IIS users will change it      
- to d:\inetpub\wwwroot      
-->   
<doc-dir>/usr/local/apache/htdocs/</doc-dir>      
<!-- the http port -->  
这段将doc-dir改成自己的doc dir,我这里是/usr/local/apache/htdocs/  


修改httpd.conf
加入

LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so  
AddModule mod_caucho.c   
<IfModule mod_caucho.c>      
CauchoConfigFile /usr/local/resin-2.1.4/conf/resin.conf  
<Location /caucho-status>  
SetHandler caucho-status  
</Location>  
</IfModule>


重新启动apache和resin

/usr/local/resin-2.1.4/bin/httpd.sh stop  
/usr/local/apache/bin/apachectl stop   
/usr/local/resin-2.1.4/bin/httpd.sh start  
/usr/local/apache/bin/apachectl start

浏览器打开
http://ip/caucho-status/
如果出现
Status : Caucho Servlet Engine
表示没有问题了

测试一下
在/usr/local/apache/htdocs/下面建立一个test.jsp……


有错吗?
 楼主| 发表于 2004-6-23 14:46:06 | 显示全部楼层
大家救命啊!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表