Using nginx to configure pan domain parsing
So that a.xxx.com b.xxx.com can be accessed
I separately configured an independent two level domain name
m.xxx.com cannot access
How to resolve pan domain name resolution? How do you not affect the configured two level domain name?
There is no need to exclude the two level domain names that have been matched, because the matching order of server_name is like this.
- Match the exact server_name, which is the two level domain name that you have configured.
- Match the server_name that starts with * wildcards, that is, the pan domain name that you set up.
- Match the server_name that ends with a * wildcard
- regular expression matching
- The above four do not match, determine whether to set default.
- No default is set, and the previous rules are configured to take effect
The priority ranges from high to low, and any one is matched to stop matching. The configured two level domain name handles the highest priority, so there is no need to do any exclusion.
Because server_name is precisely matched, the most accurate example is:
When accessing the b.a.com domain name, it will match to server_name b.a.com.
When accessing the b.a.com domain name, it will match to server_name.A.com.