Regular expression used in server_name directive

Francis Daly francis at
Sun Mar 3 21:38:54 UTC 2013

On Sun, Mar 03, 2013 at 03:16:09PM -0500, justin wrote:

Hi there,

> server_name ~^(?<account>.+)\.mydomain\.com$;
> Works.


Now compare that line with the server_name lines in the previous mails.

> This may be a bug with nginx?


> The new regular expression is valid and should work.

Yes; nginx is happy with the regular expression, provided that it knows
that it is intended to be a regular expression.

Francis Daly        francis at

More information about the nginx mailing list