Apache24 安装mod_encoding模块

安装心得

网上可下载的mod_encoding文件,适用与apache2.2,但对apache2.4无法直接使用,因此找来了自己编译可用模块的方法。

操作指令如下

wget https://www.guyusoftware.com/sh/mod_encoding.zip
unzip mod_encoding.zip
tar -zxvf mod_encoding-20021209.tar.gz
cd mod_encoding-20021209
cp ../mod_encoding.c.apache2.20040616 mod_encoding.c
patch -p0 < ../mod_encoding.c-apache2.2-20060520.patch
cd lib/ 
./configure --prefix=/usr
make
make install
ldconfig
cd ../
chmod 755 configure 
./configure --with-apxs=/usr/sbin/apxs --with-iconv-hook=/usr/include
make
gcc -shared -o mod_encoding.so mod_encoding.o -W -Wall -Llib -liconv_hook
cp mod_encoding.so apachemodules/
特别说明
–with-apxs 参数的值根据实际情况而定,可用whereis查看安装目录
用gcc一定要记得加上-W -Wall
模块粘贴位置也根据实际情况而定

猜你喜欢

转载自blog.csdn.net/luna33/article/details/52768254