2014-04-06 16:16:01
来 源
IT技术网
Apache
本文介绍Apache服务器配置中文路径支持,希望对于初学Apache服务器相关的朋友有帮助,更多Apache安装、配置、报错处理等资源请本站内搜索。
环境:Apache/2.2.12 (Unix)    需要给Apache 增加模块

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>

声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。