Linux 下 apache 实现可接受中文文件名的请求
作者: 火车头 日期: 2010-01-09 20:10
1.下载mod_encoding并打补丁包:
# wget -c http://webdav.todo.gr.jp/download/mod_encoding-20021209.tar.gz
# wget -c http://webdav.todo.gr.jp/download/experimental/mod_encoding.c.apache2.20040616
解压mod_encoding-20021209.tar.gz
将新版本mod_encoding.c 覆盖到mod_encoding-20021209
# cp mod_encoding.c.apache2.20040616 mod_encoding-20021209/mod_encoding.c
这里必须要打一个apache 2.2的补丁。否则make也会出apxs rc=65536 之类的错误。
# wget http://www.aconus.com/~oyaji/faq/mod_encoding.c-apache2.2-20060520.patch
# cd mod_encoding-20021209
# patch -p0 < mod_encoding.c-apache2.2-20060520.patch
2.安装iconv-hook
# cd mod_encoding-20021209/lib
# ./configure --prefix=/usr
# make
# make install
# ldconfig
3 生成mod_encoding.so
./configure --with-apxs=/opt/apache2.2/bin/apxs --with-iconv-hook=/usr/include
make
gcc -shared -o mod_encoding.so mod_encoding.o -Wc,-Wall -Llib -liconv_hook
cp mod_encoding.so /opt/apache2.2/modules
4. 配置apache 2.2
#LoadModule headers_module modules/mod_headers.so
LoadModule encoding_module modules/mod_encoding.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>
| Good day everybody, This website is enjoyable and so is the way the theme was written about. Oakley Limited Editions Sunglasses |
| Belstaff are without a doubt this seasons fashion must have.Belstaff Sale are quite popular and famous among men and women.Belstaff UK company is specialized in offering high quality jackets, boots, bags and so on.Belstaff UK are famous around the globe for genuine leather |
订阅
上一篇
返回
下一篇
ceramic flat iron,
chi straightening iron,
flat iron reviews,
ceramic flat iron,
chi flat irons tools,
ceramic flat iron reviews,
CHI Original Flat Iron,
chi hair dryer,