由 RangeRover 在 06-23-2004 06:39 发表:
向大家请教Resin+Apache
Resin+Apache
我在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
1<http-server>
2<!--
3
4\- The root file directory of the server. Apache users will change
5
6\- this to /usr/local/apache/htdocs and IIS users will change it
7
8\- to d:\inetpub\wwwroot
9
10\-->
11<doc-dir>/opt/apache/htdocs/</doc-dir>
12<!-- the http port -->
13
14这段将doc-dir改成自己的doc dir,我这里是/opt/apache/htdocs/
15
16
17
18再去修改httpd.conf
19
20加入
21
22
23
24LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so
25
26AddModule mod_caucho.c
27
28<ifmodule mod_caucho.c="">
29
30CauchoConfigFile /usr/local/resin-2.1.4/conf/resin.conf
31
32<location caucho-status="">
33
34SetHandler caucho-status
35
36</location>
37</ifmodule>
38
39加在最后
40
41
42
43
44
45改过后,重启resin没事,但是apache就起动不了了,
46
47
48
49# /opt/apache/bin/apachectl restart会报如下错:
50
51Syntax error on line 1052 of /opt/apache/conf/httpd.conf:
52
53Cannot 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
54
55
56
57
58
59再用其他主机测试, http://……:8080/,访到的页面是“Directory of /”开头的非正常显示的apache页面。
60
61
62
63到底该怎么改好它呢?
64
65
66
67另外好像各位老大们在精华区里讲到resin不多,希望有哪位英雄给我讲讲Resin和Apache整合的操作,实在是很急啊……
68
69或者能提供好的教程也行啊,谢了
70
71
72
73再次谢谢了!   
74
75
76
77
78* * *
79
80
81_由 RangeRover 在 06-23-2004 06:42 发表:_
82
83
84
85****
86
87
88
89
90
91讲解resin的原贴如下:
92
93烦请大家给看看,是它有什么问题,还是我的哪一步做错了???
94
95
96
97编译apache时候必须加入了DSO支持,如果没有,请加入 --enable-module=so 选项重新编译apache
98
99安装resin:
100
101下载resin的安装包
102
103
104
105
106
107/usr/local
108
109# tar -zxvf resin-2.1.4.tar.gz
110
111/usr/local
112
113# cd resin-2.1.4/bin
114
115/usr/local/resin-2.1.4/bin
116
117# httpd.sh start
118
119
120
121如果没有错误消息
122
123看一下 http://ip:8080/
124
125能看到resin的页面就表示单独运行resin成功了
126
127
128
129下面是比较重要的整合resin和apache
130
131首先编译mod_caucho
132
133下载resin的源代码
134
135
136
137/usr/local# tar -zxvf resin-2.1.4-src.tar.gz /usr/local
138
139# cd resin-2.1.4-src /usr/local/resin-2.1.4-src
140
141# ./configure --with-apxs=/usr/local/apache/bin/apxs 或者 /usr/local/resin-2.1.4-src
142
143# ./configure --with-apxs=/usr/local/apache /usr/local/apache为apache的安装路径 然后 /usr/local/resin-2.1.4-src
144
145# make
146
147# make install
148
149
150
151
152
153修改resin-2.1.4/conf/resin.conf
154
155
156
157<http-server>
158
159<!--
160
161\- The root file directory of the server. Apache users will change
162
163\- this to /usr/</http-server></http-server>