Today encountered a fun problem, also thought is nginx cache, all kinds of cleanup is bad to the Nginx uninstall, and then think about the problem should be Chinese domain name, the Chinese code, done, as follows:
... server { listen ; server_name abc.cn; Root/home/abc/abcpage; index/1/abcpage.html; } server { listen ; server_name Chinese. cn; Root/home/123/123page; index/1/123page.html; } ...
Enter Chinese on the browser URL. CN should be able to jump to 123page.html but jump to abcpage.html.
Finally found that the Chinese domain name conversion to Punycode code can be identified by Nginx
(Under the Encyclopedia: Punycode is a coding system based on the RFC 3492 standard, which is mainly used to convert a domain name from a Unicode encoding used in a local language into a code that can be used in a DNS system. Punycode can prevent the so-called IDN spoofing)
Find an online conversion tool: http://tools.jb51.net/punycode/, as follows:
The configuration file is changed to:
... server { listen ; server_name abc.cn; Root/home/abc/abcpage; index/1/abcpage.html; } server { listen ; server_name xn--fiq228c.cn; Root/home/123/123page; index/1/123page.html; } ...
Then visit Chinese. cn to jump to 123page.html!
Nginx config Chinese domain name