mod_encoding-20021209.tar.gz
mod_encoding.c-apache2.2-20060520.patch
mod_encoding.c.apache2.20040616
[[email protected] mod]# tar -zxvf mod_encoding-20021209.tar.gz
[[email protected] mod]# cp mod_encoding.c.apache2.20040616 mod_encoding-20021209/mod_encoding.c
[[email protected] mod]# cd mod_encoding-20021209
[[email protected] mod_encoding-20021209]# patch -p0 [[email protected] mod_encoding-20021209]# cd lib/
[[email protected] lib]# ./configure
[[email protected] lib]# make
[[email protected] lib]# make install
[[email protected] lib]# cd ..
[[email protected] mod_encoding-20021209]# cp ../mod_encoding.c-apache2.2-20060520.patch ./
[[email protected] mod_encoding-20021209]# patch -p0 [[email protected] mod_encoding-20021209]# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-iconv-hook=/usr/include
[[email protected] mod_encoding-20021209]# gcc -shared -o mod_encoding.so mod_encoding.o -Wc,-Wall -Llib -liconv_hook
[[email protected] mod_encoding-20021209]# cp mod_encoding.so /usr/local/apache/modules/
修改 httpd.conf
LoadModule headers_module modules/mod_headers.so
<IfModule mod_headers.c>
Header add MS-Author-Via "DAV"
</IfModule>
<IfModule mod_encoding.c>
EncodingEngine on
NormalizeUsername on
SetServerEncoding GBK
DefaultClientEncoding UTF-8 GBK GB2312
AddClientEncoding "(Microsoft .* DAV $)" UTF-8 GBK GB2312
AddClientEncoding "Microsoft .* DAV" UTF-8 GBK GB2312
AddClientEncoding "Microsoft-WebDAV*" UTF-8 GBK GB2312
</IfModule>