Home  >  Article  >  Operation and Maintenance  >  Nginx Chinese domain name configuration example analysis

Nginx Chinese domain name configuration example analysis

WBOY
WBOYforward
2023-05-21 19:16:04929browse

nginx Chinese domain name configuration

A Chinese domain name is bound to the nginx virtual host, such as linuxeye.China, and the browser cannot jump.

#why?

Because the core of the operating system is composed of English, and the resolution of the dns server is also exchanged by English codes, so the dns server does not support direct Chinese Domain name resolution, all Chinese domain name resolution needs to be converted into punycode code, and then the punycode code is parsed by dns. In fact, all current browsers perfectly support Chinese domain names, but the browser software actively adds Chinese domain name automatic transcoding, and there is no need to re-install the Chinese domain name transcoding control to complete the entire process.

Chinese domain name can be changed to punycode encoding, online transcoding address:, as shown below:

Nginx Chinese domain name configuration example analysis

punycode?

punycode is a coding system developed based on the rfc 3492 standard. It is mainly used to convert domain names from the unicode encoding used in local languages ​​to encoding that can be used in the dns system. The "Chinese domain name" suffix is ​​not supported by standard parsing servers and needs to be converted into punycode for parsing.

Modify nginx configuration

server {
listen 80;
server_name blog.linuxeye.com linuxeye.xn--fiqs8s;
...
}

Save and reload nginx:

service nginx reload

The above is the detailed content of Nginx Chinese domain name configuration example analysis. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete