Regular expression used in server_name directive

Francis Daly francis at
Sun Mar 3 19:12:50 UTC 2013

On Sun, Mar 03, 2013 at 12:43:57PM -0500, justin wrote:

Hi there,

> I am using a regular expression with a capture group in my server_name
> directive. It looks like:
>     server_name (?<account>.+)\.mydomain\.com$ for details of how the matching server{}
block is chosen.

> The problem is that I want to expand it slightly and say anything except
> I.E.
> matches, but does not match.
> How is this possible?

Make a different server{} block that matches

Francis Daly        francis at

More information about the nginx mailing list