Nginx domain name configuration _ how to configure a Chinese domain name for nginx

Source: Internet
Author: User
Nginx configures the Chinese domain name and starts to configure the Chinese domain name directly written, but fails to parse the correct server. Then google finally found the cause.

The Nginx virtual host is bound with a domain name with Chinese characters, such as linuxeye. China. The browser cannot jump.

Why?

Because the core of the operating system is English, DNS Server Resolution is also performed by English code exchange, so the DNS server does not support direct Chinese domain name resolution, all Chinese domain names must be resolved to punycode, and then the punycode will be resolved by DNS. In fact, the Chinese domain name is perfectly supported by various browsers, but the browser software has automatically added the Chinese domain name to the code conversion, and does not need to re-install the Chinese domain name transcoding control to complete the entire process.

The Chinese domain name can be changed to Punycode encoding. The online transcoding address is http://tools.jb51.net/punycode/, for example:

Punycode?

Punycode is an Encoding System Based on RFC 3492 standards. It is mainly used to convert the Unicode encoding used by the local language into the encoding that can be used by the DNS system. The suffix of "Chinese domain name" is not supported by the standard resolution server and must be converted to punycode for resolution.

Modify Nginx Configuration
  1. Server {
  2. Listen 80;
  3. Server_name blog.linuxeye.com linuxeye. xn -- fiqs8s;
  4. ...
  5. }

Save and reload nginx:

  1. Service nginx reload
Thu Jan 28
Related Article

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.