Chinaunix

标题: apache的DSO问题 [打印本页]

作者: kronos911    时间: 2005-11-26 19:15
标题: apache的DSO问题
1、环境:FreeBSD 5.4+mysql4+php4+apache2.0.54
源码安装apache ./configure --prefix="..." --enable-shared=max --enable-module=rewrite --enable-module=so
2、现在想使用 rewrite功能,在httpd.conf中加入 RewriteEngine on 启动apache就出错Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
3、从源码文件夹中cp mod_rewrite.c 文件执行 apxs -i -a -c mod_rewrite.c
出错:apxs:Error: Command failed with rc=65536
4、执行httpd -l 有mod_so.c 没有mod_rewrite 的相关信息
5、cp源码一个mod_so.c 执行 apxs -i -c -a mod_so 仍然出错
Warning! dlname not found in /server/apache2/modules/mod_so.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /server/apache2/modules/mod_so.so
chmod: /server/apache2/modules/mod_so.so: No such file or directory
apxs:Error: Command failed with rc=65536
6、不过在当前目录中多了mod_so.la lo o slo几个文件
7、在module文件夹中也多了mod_so.a la 两个文件
不知道是那里出错了,我搞了一个下午还是 没搞定
作者: kronos911    时间: 2005-11-27 10:45
顶一下
作者: HonestQiao    时间: 2005-11-27 15:42
原帖由 kronos911 于 2005-11-26 19:15 发表
1、环境:FreeBSD 5.4+mysql4+php4+apache2.0.54
源码安装apache ./configure --prefix="..." --enable-shared=max --enable-module=rewrite --enable-module=so
2、现在想使用 rewrite功能,在htt ...


1、环境:FreeBSD 5.4+mysql4+php4+apache2.0.54
源码安装apache ./configure --prefix="..." --enable-shared=max --enable-module=rewrite --enable-module=so
已经支持dso了
2、现在想使用 rewrite功能,在httpd.conf中加入 RewriteEngine on 启动apache就出错Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
没有加载mod_rewrite,当然出错
3、从源码文件夹中cp mod_rewrite.c 文件执行 apxs -i -a -c mod_rewrite.c
出错:apxs:Error: Command failed with rc=65536
最后去mod_rewrite在apache spurce下面的目录使用完整的apxs路径这么做
4、执行httpd -l 有mod_so.c 没有mod_rewrite 的相关信息
5、cp源码一个mod_so.c 执行 apxs -i -c -a mod_so 仍然出错
Warning! dlname not found in /server/apache2/modules/mod_so.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /server/apache2/modules/mod_so.so
chmod: /server/apache2/modules/mod_so.so: No such file or directory
apxs:Error: Command failed with rc=65536
多此一举
6、不过在当前目录中多了mod_so.la lo o slo几个文件
7、在module文件夹中也多了mod_so.a la 两个文件



个人建议,你保留了你安装时候的apache的src,对么,那么你可以重新编译一份到/usr/local/test-apache,并且记得用上支持rewrite。
然后把这个里面的需要的模块拷贝过去即可。
作者: ipaddr    时间: 2005-11-28 00:03
rewrite没有单独编译成一个模板文件。

估计是楼主编译时打错了。


我有一次,也是写成:--enable-rewirte

编译没出错,但配置文件里打开rewrite就报错。
作者: level    时间: 2005-11-28 13:41
重新编译一次!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2