Detailed Linux environment to enable Nginx server to support the configuration process of Chinese URL _nginx

Source: Internet
Author: User

1: Make sure your system is UTF coded

[Root@tserver ~]# env|grep LANG
lang=en_us. UTF-8

The default encoding in the 2:nginx configuration file is set to Utf-8

Server
{
listen;
server_name. inginx.com;
Index index.html index.htm index.php;
root/usr/local/nginx/html/inginx.com;
CharSet utf-8;
}


If you are uploading files with SECURECRT, please select the –> appearance –utf-8
If the FTP software also sets the default encoding to TUF-8

3. Convert UTF-8 filename to UTF-8 encoding
The advantage of using Nginx is the ability to use the Chinese URL, but the file name of Windows is GBK by default, and you need to convert it.
The procedure is very simple, the file name is modified to UTF8 code on it! "But Apache doesn't need to be so troublesome."
Install CONVMV, by which he goes to convert the code:

Yum install convmv-y
convmv-f gbk-t utf8-r Target Destination Path

Where-f is the source code,-T is the target encoding,-R is a recursive directory,--notest is not moving, actually renaming the file, target is the destination directory
In the case of Windows operating system, you can disregard this method, general Windows under the use of Nginx forwarding is not the case, the method of the approach is only for Linux under the operation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.