Nginx configuration file does not have the relevant rewrite jump rules, then it should be MediaWiki PHP program to do the jump, but, traverse the MediaWiki directory of all files and query the MySQL database of each table, no record of this domain name is found. Later, by looking at the source code found MediaWiki is based on the $_server[' server_name '] do the jump, follow the clues, found the following issues:
In a nginx virtual host, you can bind multiple server_name, for example:
The server_name order of the different, to the PHP program using $_server["SERVER_NAME" or getenv (' server_name ') to obtain the server domain name is influential:
$_server["SERVER_NAME"] or getenv (' server_name ') gets always the first domain name in the Nginx server_name configuration, which needs to be noted in program development. This first domain name is equivalent to the Apache virtual host configuration in the ServerName, the following domain name is equivalent to Apache Serveralias.