红联Linux门户
Linux帮助

Linux apache单独编译mod_rewrite.so

发布时间:2016-05-01 10:41:31来源:linux网站作者:maxracer

1.寻找apache源码安装目录中的mod_rewrite.c文件
#find / -name mod_rewrite.c
/usr/httpd-2.2.22/modules/mappers/mod_rewrite.c


2.切换到mod_rewrite.c文件目录
#cd /usr/httpd-2.2.22/modules/mappers/


3.编译
#/usr/apache/Apache2.2/bin/apxs -c mod_rewrite.c
#/usr/apache/Apache2.2/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
在/usr/apache/Apache2.2/modules中会编译好mod_rewrite.so


4.如果是Apache2.2.22版本
LoadModule mod_rewrite_module modules/mod_rewrite.so 前面添加#注释符;


本文永久更新地址:http://www.linuxdiyf.com/linux/20257.html