Although I never like to enter Chinese in the URL, use Chinese page file names, or Chinese picture names, some friends still like to do this, so I searched and found that Chinese is supported under the DirectAdmin panel (Apache2.2.*) The solution to the file name and Chinese picture name, after personal testing, make a record here for easy reference!
The following process of installing mod_encoding to support Chinese file names in DirectAdmin is completely shared by Captain from the global hosting forum. I would like to express my gratitude to you. Buy DA authorization, buy Jing'an fourth line, and find Brother Captain!

Since the operation methods under 32-bit and 64-bit systems are slightly different, they are described separately. First, let's look at the installation method under 32bit CentOS.
Log in to the server via SSH as the root user, and then follow the following code.
wget ftp://ftp.aconus.com/fc5/mod_encoding/mod_encoding-2.2.0-1.i386.tar.gz #Download the installation package
tar zxvf mod_encoding-2.2.0-1.i386.tar.gz <x2 > #Decompress
rpm -ivh iconv_hook-1.0.0-1.i386.rpm
rpm -ivh mod_encoding-2.2.0-1.i386.rpm #Install
After installation, we also need to modify the configuration file so that Apache supports Chinese names.
vi /etc/httpd/conf/httpd.conf #Edit httpd.conf
Add the following content
LoadModule encoding_module /usr/lib/httpd/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>
Save, exit, and restart Apache.
service httpd restart
[Note] The locations of httpd.conf and mod_encoding.so above may be different, please modify them according to your own location.
If you are using a 64bit system to install DirectAdmin, please read below. The above operations only apply to 32bit systems.
First, install the necessary components.
yum install gcc –y #Install gcc component
wget http://d.nicwind.com/files/mod_encoding_64.tar. gz #Download the compressed package
tar zxvf mod_encoding_64.tar.gz #Decompress
Next, compile step by step.
tar zxvf mod_encoding_64.tar.gz
cd mod_encoding_64
patch -p0 < mod_encoding.c-apache2.2-20060520.patch
cd lib
chmod 755 configure
./configure –prefix= /usr
make && make install
ldconfig
cd ../
chmod 755 configure
cp -p /usr/sbin/apxs /usr/bin
./configure –with -apxs=/usr/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 /usr/lib/httpd/modules
【Note】Please modify /usr/lib/httpd/modules in the last line of code according to the module location.
Next, we still need to modify the Apache configuration file.
vi /etc/httpd/conf/httpd.conf #Edit httpd.conf
Add the following.
LoadModule encoding_module modules/mod_encoding.so
<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>
【Note】 Please adjust the code for the modules/mod_encoding.so above according to the location of the mod_encoding.so file you compiled.
Save, exit, and finally restart Apache!
service httpd restart
Okay, the above is the entire process of installing mod_encoding for DirectAdmin so that it can support Chinese URL file names. The original text of this tutorial is quoted from the post posted by Captain on the Global Host Forum, and I would like to express my gratitude to you. If you want to buy DA authorization or buy Jing'an fourth line, you can go to Captain!
