Server_Name regular expression

Jonathan Matthews contact at
Fri Aug 30 08:54:22 UTC 2013

On 29 Aug 2013 10:01, "christospap" <nginx-forum at> wrote:
> I would like to syntax a regular expression which will match two server
> names. The server names are and In
> a regular expression for www or nothing
> I wrote the following regular expression (www\.|)

Irrespective of your use of this in an nginx config, you have made a
mistake constructing the regex. It's such a simple one that I feel
relatively sure that you're a newcomer to such things, hence I would
suggest you find a regex primer (book|website) and study it carefully.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list