Nginx server_name Directive with Regular Expression: Matching Domain Names
The server_name directive in nginx is used to specify the domain name(s) that should match the server block. In this case, the server_name is using a regular expression pattern with the ~^ operator to match any domain name that contains at least one character and ends with another character. The regular expression pattern is (.+)?(.+$), where (.+)? matches any number of characters (including zero) and (.+)$ matches any number of characters at the end of the string.
原文地址: https://www.cveoy.top/t/topic/p9cL 著作权归作者所有。请勿转载和采集!