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

Nginx Chinese domain name configuration example analysis

WBOY
Release: 2023-05-21 19:16:04
forward
1009 people have browsed it

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;
...
}
Copy after login

Save and reload nginx:

service nginx reload
Copy after login

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template