Answer the question
In order to leave comments, you need to log in
What regex to use for subdomain in server_name Nginx?
Hello. Suggest a regular expression for the server_name directive that would process subdomains of the form tmp-01-некий_уникальный_идентификатор.mydomain.ru
. That is tmp-01-
, they are .mydomain.ru
always present, and некий_уникальный_идентификатор
can be of any length and consist only of numbers and Latin characters.
Answer the question
In order to leave comments, you need to log in
~^tmp\-01\-.+\.mydomain\.ru$~
nginx.org/ru/docs/http/server_names.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question