I. Installation
# Yum install httpd
Ii. Question about the Chinese file name
Run the RPM command to install mod_encoding. in Linux, Apache supports Chinese names.
---------------------- RPM installation mod_encoding ------------------------
In Linux, Apache supports Chinese names, all of which are about mod_encoding.
Mod_encoding-20021209.tar.gz this version has serious memory leakage issues. Generally, 4G memory runs out within one day.
I wonder if this RPM package has been resolved
1. My version is Apache 2.2.3. Please note that your Apache version is generally 2.2.x.
2. To enable mod_encoding, you must enable the mod_headers module.
VI httpd. conf modification (the installation of this module is not described. For details, refer to my Apache built-in ):
Loadmodule headers_module modules/mod_headers.so
3. the/etc/httpd/CONF. d/mod_encoding.conf file is automatically generated when the mod_encoding RPM package is installed.
----------- The installation steps are as follows:
Wget ftp://ftp.aconus.com/fc5/mod_encoding/mod_encoding-2.2.0-1.i386.tar.gz
Tar zxvf mod_encoding-2.2.0-1.i386.tar.gz
Rpm-IVH iconv_hook-1.0.0-1.i386.rpm mod_encoding-2.2.0-1.i386.rpm
Rpm-SQL mod_encoding-2.2.0-1.i386
Rpm-SQL iconv_hook-1.0.0-1.i386
The content of/etc/httpd/CONF. d/mod_encoding.conf is as follows:
LoadFile/usr/local/lib/libiconv_hook.so.1
Loadmodule encoding_module modules/mod_encoding.so
<Ifmodule mod_encoding.c>
Encodingengine on
Normalizeusername on
Setserverencoding GBK
Defaultclientencoding UTF-8 GBK gb2312
</Ifmodule>
5. Modification completed
3. webpage garbled
Modify:/etc/httpd/CONF/httpd. conf
# Adddefacharset UTF-8
Adddefacharcharset gb2312
# Adddefacharcharset off
4. Configure mime
Append in/etc/mime. Types
For example, application/X-Silverlight-app xap
Restart Apache
# Service httpd restart